Exception: JsonApiClient::Errors::UnexpectedStatus

Inherits:
ServerError show all
Defined in:
lib/json_api_client/errors.rb

Instance Attribute Summary collapse

Attributes inherited from ApiError

#env

Instance Method Summary collapse

Constructor Details

#initialize(code, uri) ⇒ UnexpectedStatus

Returns a new instance of UnexpectedStatus.



105
106
107
108
109
110
111
# File 'lib/json_api_client/errors.rb', line 105

def initialize(code, uri)
  @code = code
  @uri = uri

  msg = "Unexpected response status: #{code} from: #{uri.to_s}"
  super nil, msg
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



104
105
106
# File 'lib/json_api_client/errors.rb', line 104

def code
  @code
end

#uriObject (readonly)

Returns the value of attribute uri.



104
105
106
# File 'lib/json_api_client/errors.rb', line 104

def uri
  @uri
end