Exception: Qismo::HTTPRequestError
- Defined in:
- lib/qismo/error.rb
Overview
Http request error
Direct Known Subclasses
BadRequestError, ForbiddenError, InternalServerError, NotFoundError, PaymentRequiredError, TooManyRequestError, UnauthorizedError
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#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:, response_body:) ⇒ HTTPRequestError
constructor
Initiate error.
Constructor Details
#initialize(message, status_code:, response_body:) ⇒ HTTPRequestError
Initiate error
25 26 27 28 29 30 31 |
# File 'lib/qismo/error.rb', line 25 def initialize(, status_code:, response_body:) super(.to_s) @message = @status_code = status_code @response_body = response_body end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
18 19 20 |
# File 'lib/qismo/error.rb', line 18 def @message end |
#response_body ⇒ Object (readonly)
Returns the value of attribute response_body.
18 19 20 |
# File 'lib/qismo/error.rb', line 18 def response_body @response_body end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
18 19 20 |
# File 'lib/qismo/error.rb', line 18 def status_code @status_code end |