Exception: Sink::HTTP::ResponseError
- Defined in:
- lib/sink/base_client.rb
Direct Known Subclasses
APIStatusError, AuthenticationError, BadRequestError, ConflictError, InternalServerError, NotFoundError, PermissionDeniedError, RateLimitError, UnprocessableEntityError
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(message:, response:, body:) ⇒ ResponseError
constructor
A new instance of ResponseError.
Constructor Details
#initialize(message:, response:, body:) ⇒ ResponseError
Returns a new instance of ResponseError.
354 355 356 357 358 359 |
# File 'lib/sink/base_client.rb', line 354 def initialize(message:, response:, body:) super() @response = response @body = body @code = response.code.to_i end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
348 349 350 |
# File 'lib/sink/base_client.rb', line 348 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
352 353 354 |
# File 'lib/sink/base_client.rb', line 352 def code @code end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
348 349 350 |
# File 'lib/sink/base_client.rb', line 348 def response @response end |