Exception: SacsRuby::Error
- Inherits:
-
StandardError
- Object
- StandardError
- SacsRuby::Error
- Defined in:
- lib/sacs_ruby/error.rb
Overview
Error implementation
Direct Known Subclasses
AuthorizationError, BadRequestError, ClientRequestError, JsonSchemaError, NotFoundError, TokenRequestError, TooManyRequestsError
Instance Method Summary collapse
- #description ⇒ Object
- #error ⇒ Object
-
#initialize(response) ⇒ Error
constructor
A new instance of Error.
- #to_s ⇒ Object
Constructor Details
#initialize(response) ⇒ Error
Returns a new instance of Error.
4 5 6 |
# File 'lib/sacs_ruby/error.rb', line 4 def initialize(response) @response = response end |
Instance Method Details
#description ⇒ Object
12 13 14 |
# File 'lib/sacs_ruby/error.rb', line 12 def description @description = @response['message'] end |
#error ⇒ Object
8 9 10 |
# File 'lib/sacs_ruby/error.rb', line 8 def error @error = @response['type'] end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/sacs_ruby/error.rb', line 16 def to_s "error='#{error}' description='#{description}'" end |