Exception: JsonApiClient::Errors::UnexpectedStatus
- Inherits:
-
ServerError
- Object
- StandardError
- ApiError
- ServerError
- JsonApiClient::Errors::UnexpectedStatus
- Defined in:
- lib/json_api_client/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
Instance Method Summary collapse
-
#initialize(code, uri) ⇒ UnexpectedStatus
constructor
A new instance of UnexpectedStatus.
- #message ⇒ Object
Constructor Details
#initialize(code, uri) ⇒ UnexpectedStatus
Returns a new instance of UnexpectedStatus.
35 36 37 38 |
# File 'lib/json_api_client/errors.rb', line 35 def initialize(code, uri) @code = code @uri = uri end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
34 35 36 |
# File 'lib/json_api_client/errors.rb', line 34 def code @code end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
34 35 36 |
# File 'lib/json_api_client/errors.rb', line 34 def uri @uri end |
Instance Method Details
#message ⇒ Object
39 40 41 |
# File 'lib/json_api_client/errors.rb', line 39 def "Unexpected response status: #{code} from: #{uri.to_s}" end |