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
81 82 83 84 |
# File 'lib/shift/api/core/errors.rb', line 81 def initialize(code, uri) @code = code @uri = uri end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
80 81 82 |
# File 'lib/shift/api/core/errors.rb', line 80 def code @code end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
80 81 82 |
# File 'lib/shift/api/core/errors.rb', line 80 def uri @uri end |
Class Method Details
.from_jsonapi_client(ex) ⇒ Object
90 91 92 |
# File 'lib/shift/api/core/errors.rb', line 90 def self.from_jsonapi_client(ex) new(ex.code, ex.uri) end |
Instance Method Details
#message ⇒ Object
86 87 88 |
# File 'lib/shift/api/core/errors.rb', line 86 def "Unexpected response status: #{ code } from: #{ uri }" end |