class ReamazeAPI::Client::RaiseErrorMiddleware

Raises a ReamazeAPI::Error for any HTTP response code 400-599.

Private Instance Methods

on_complete(response) click to toggle source

Private: Raises a ReamazeAPI::Error for any HTTP response code 400-599.

response - HTTP response (Faraday::Env)

Returns nothing.

# File lib/reamaze_api/client.rb, line 16
def on_complete(response)
  if error = ReamazeAPI::Error.from_response(response)
    raise error
  end
end