Exception: JenkinsApi::Exceptions::Forbidden

Inherits:
ApiException
  • Object
show all
Defined in:
lib/jenkins_api_client/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

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

Returns a new instance of Forbidden



98
99
100
101
102
# File 'lib/jenkins_api_client/exceptions.rb', line 98

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