Exception: Delighted::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Delighted::Error
- Defined in:
- lib/delighted/errors.rb
Direct Known Subclasses
AuthenticationError, GeneralAPIError, ResourceValidationError, ServiceUnavailableError, UnsupportedFormatRequestedError
Instance Method Summary collapse
-
#initialize(response) ⇒ Error
constructor
A new instance of Error.
- #to_s ⇒ Object
Constructor Details
#initialize(response) ⇒ Error
Returns a new instance of Error.
3 4 5 |
# File 'lib/delighted/errors.rb', line 3 def initialize(response) @response = response end |
Instance Method Details
#to_s ⇒ Object
7 8 9 |
# File 'lib/delighted/errors.rb', line 7 def to_s "#{@response.status_code}: #{@response.body}" end |