Exception: CF::APIError
Direct Known Subclasses
BadGatewayError, BadRequestError, ForbiddenError, GatewayTimeoutError, InternalServerError, NotFoundError, ServiceUnavailableError, TooManyRequestsError, UnauthorizedError, UnprocessableEntityError
Instance Attribute Summary collapse
-
#response_body ⇒ Object
readonly
Returns the value of attribute response_body.
-
#response_headers ⇒ Object
readonly
Returns the value of attribute response_headers.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, status: nil, response_body: nil, response_headers: nil) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(message, status: nil, response_body: nil, response_headers: nil) ⇒ APIError
Returns a new instance of APIError.
13 14 15 16 17 18 |
# File 'lib/cf/errors.rb', line 13 def initialize(, status: nil, response_body: nil, response_headers: nil) super() @status = status @response_body = response_body @response_headers = response_headers end |
Instance Attribute Details
#response_body ⇒ Object (readonly)
Returns the value of attribute response_body.
11 12 13 |
# File 'lib/cf/errors.rb', line 11 def response_body @response_body end |
#response_headers ⇒ Object (readonly)
Returns the value of attribute response_headers.
11 12 13 |
# File 'lib/cf/errors.rb', line 11 def response_headers @response_headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
11 12 13 |
# File 'lib/cf/errors.rb', line 11 def status @status end |