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