Exception: Lhj::JenkinsApi::Exceptions::Forbidden

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

Overview

This exception class handles cases where invalid credentials are provided to connect to the Jenkins. While it is apparently used to indicate expiry of a Crumb, this is not the only cause of a forbidden error… maybe the user just isn’t allowed to access the given url. We should treat forbidden as a specific “you are not welcome here”

Direct Known Subclasses

ForbiddenWithCrumb

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Forbidden.



77
78
79
80
81
# File 'lib/lhj/jenkins/exceptions.rb', line 77

def initialize(logger, message = "", log_level = Logger::ERROR)
  msg = "Access denied. Please ensure that Jenkins is set up to allow" +
    " access to this operation. #{message}"
  super(logger, msg)
end