Exception: Shift::Api::Core::Errors::UnexpectedStatus
- Inherits:
-
ServerError
- Object
- StandardError
- ApiError
- ServerError
- Shift::Api::Core::Errors::UnexpectedStatus
- Defined in:
- lib/shift/api/core/errors.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Attributes inherited from ApiError
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(code, uri) ⇒ UnexpectedStatus
constructor
A new instance of UnexpectedStatus.
- #message ⇒ Object
Methods inherited from ServerError
Constructor Details
#initialize(code, uri) ⇒ UnexpectedStatus
Returns a new instance of UnexpectedStatus.
89 90 91 92 |
# File 'lib/shift/api/core/errors.rb', line 89 def initialize(code, uri) @code = code @uri = uri end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
88 89 90 |
# File 'lib/shift/api/core/errors.rb', line 88 def code @code end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
88 89 90 |
# File 'lib/shift/api/core/errors.rb', line 88 def uri @uri end |
Class Method Details
.from_jsonapi_client(ex) ⇒ Object
98 99 100 |
# File 'lib/shift/api/core/errors.rb', line 98 def self.from_jsonapi_client(ex) new(ex.code, ex.uri) end |
Instance Method Details
#message ⇒ Object
94 95 96 |
# File 'lib/shift/api/core/errors.rb', line 94 def "Unexpected response status: #{ code } from: #{ uri }" end |