Exception: RDStation::Error
- Inherits:
-
StandardError
- Object
- StandardError
- RDStation::Error
- Defined in:
- lib/rdstation/error.rb,
lib/rdstation/error/format.rb,
lib/rdstation/error/formatter.rb
Direct Known Subclasses
BadGateway, BadRequest, Conflict, Forbidden, InternalServerError, MethodNotAllowed, NotAcceptable, NotFound, NotImplemented, ServerError, ServiceUnavailable, TooManyRequests, Unauthorized, UnknownError, UnprocessableEntity, UnsupportedMediaType
Defined Under Namespace
Classes: BadGateway, BadRequest, Conflict, ConflictingField, ExpiredAccessToken, ExpiredCodeGrant, Forbidden, Format, Formatter, InternalServerError, InvalidCredentials, InvalidEventType, MethodNotAllowed, NotAcceptable, NotFound, NotImplemented, ServerError, ServiceUnavailable, TooManyRequests, Unauthorized, UnknownError, UnprocessableEntity, UnsupportedMediaType
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
Instance Method Summary collapse
-
#initialize(details) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(details) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 10 11 |
# File 'lib/rdstation/error.rb', line 5 def initialize(details) @details = details = details['error_message'] raise ArgumentError, 'The details hash must contain an error message' unless super() end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
3 4 5 |
# File 'lib/rdstation/error.rb', line 3 def body @body end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
3 4 5 |
# File 'lib/rdstation/error.rb', line 3 def details @details end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
3 4 5 |
# File 'lib/rdstation/error.rb', line 3 def headers @headers end |
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
3 4 5 |
# File 'lib/rdstation/error.rb', line 3 def http_status @http_status end |