Exception: JenkinsApi::Exceptions::ServiceUnavailable

Inherits:
ApiException
  • Object
show all
Defined in:
lib/improved_jenkins_client/exceptions.rb

Overview

This exception class handles cases where the Jenkins is getting restarted or reloaded where the response code returned is 503

Instance Method Summary collapse

Constructor Details

#initialize(logger, message = "", log_level = Logger::ERROR) ⇒ ServiceUnavailable

Returns a new instance of ServiceUnavailable.



216
217
218
219
220
221
# File 'lib/improved_jenkins_client/exceptions.rb', line 216

def initialize(logger, message = "", log_level = Logger::ERROR)
  message = "Jenkins is being reloaded or restarted. Please wait till" +
    " Jenkins is completely back online. This can be" +
    " programatically achieved by System#wait_for_ready" if message.empty?
  super(logger, message)
end