Exception: Shift::Api::Core::Errors::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- Shift::Api::Core::Errors::ApiError
- Defined in:
- lib/shift/api/core/errors.rb
Direct Known Subclasses
ClientError, ConnectionError, ServerError, ServiceUnavailable
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#original_exception ⇒ Object
readonly
Returns the value of attribute original_exception.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(env, original_exception) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(env, original_exception) ⇒ ApiError
Returns a new instance of ApiError.
11 12 13 14 |
# File 'lib/shift/api/core/errors.rb', line 11 def initialize(env, original_exception) @env = env @original_exception = original_exception end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
9 10 11 |
# File 'lib/shift/api/core/errors.rb', line 9 def env @env end |
#original_exception ⇒ Object (readonly)
Returns the value of attribute original_exception.
9 10 11 |
# File 'lib/shift/api/core/errors.rb', line 9 def original_exception @original_exception end |
Class Method Details
.from_jsonapi_client(ex) ⇒ Object
16 17 18 |
# File 'lib/shift/api/core/errors.rb', line 16 def self.from_jsonapi_client(ex) new(ex.env, ex) end |