Exception: Cashboard::HTTPError
- Inherits:
-
StandardError
- Object
- StandardError
- Cashboard::HTTPError
- Defined in:
- lib/cashboard/errors.rb
Direct Known Subclasses
BadRequest, Forbidden, NotFound, PaymentRequired, RateLimited, ServerError, Unavailable
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ HTTPError
constructor
A new instance of HTTPError.
- #to_s ⇒ Object
Constructor Details
#initialize(response) ⇒ HTTPError
Returns a new instance of HTTPError.
6 7 8 9 |
# File 'lib/cashboard/errors.rb', line 6 def initialize(response) @response = response super end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
5 6 7 |
# File 'lib/cashboard/errors.rb', line 5 def response @response end |
Instance Method Details
#to_s ⇒ Object
11 12 13 14 15 16 |
# File 'lib/cashboard/errors.rb', line 11 def to_s #hint = response.response.body.nil? ? nil : response.response.body #"#{self.class.to_s} : #{response.code}#{" - #{hint}" if hint}" response.inspect end |