Exception: SgtnClient::Exceptions::UnsuccessfulApiCall

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/sgtn-client/core/exceptions.rb

Overview

API error: returned as 200 + “error” key in response.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_error) ⇒ UnsuccessfulApiCall

Returns a new instance of UnsuccessfulApiCall.



109
110
111
112
# File 'lib/sgtn-client/core/exceptions.rb', line 109

def initialize(api_error)
  super(api_error['message'])
  @api_error = api_error
end

Instance Attribute Details

#api_errorObject (readonly)

Returns the value of attribute api_error.



107
108
109
# File 'lib/sgtn-client/core/exceptions.rb', line 107

def api_error
  @api_error
end