Exception: ReactorSDK::Error
- Inherits:
-
StandardError
- Object
- StandardError
- ReactorSDK::Error
- Defined in:
- lib/reactor_sdk/error.rb
Overview
Base class for all ReactorSDK errors. Every other error in this file inherits from this class.
Direct Known Subclasses
AuthenticationError, AuthorizationError, ConfigurationError, ParseError, RateLimitError, ResourceNotFoundError, ServerError, UnprocessableEntityError
Instance Attribute Summary collapse
-
#cause ⇒ Exception?
readonly
The original exception that caused this one.
-
#status ⇒ Integer?
readonly
HTTP status code from the API response.
Instance Method Summary collapse
-
#initialize(message, status: nil, cause: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message, status: nil, cause: nil) ⇒ Error
Returns a new instance of Error.
38 39 40 41 42 |
# File 'lib/reactor_sdk/error.rb', line 38 def initialize(, status: nil, cause: nil) super() @status = status @cause = cause end |
Instance Attribute Details
#cause ⇒ Exception? (readonly)
Returns The original exception that caused this one.
31 32 33 |
# File 'lib/reactor_sdk/error.rb', line 31 def cause @cause end |
#status ⇒ Integer? (readonly)
Returns HTTP status code from the API response.
28 29 30 |
# File 'lib/reactor_sdk/error.rb', line 28 def status @status end |