Class: OpConnect::Response::RaiseError
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- OpConnect::Response::RaiseError
- Defined in:
- lib/op_connect/response/raise_error.rb
Overview
This class raises an OpConnect-flavored exception based on HTTP status codes returned by the API.
Instance Method Summary collapse
Instance Method Details
#on_complete(response) ⇒ Object
9 10 11 12 13 |
# File 'lib/op_connect/response/raise_error.rb', line 9 def on_complete(response) if (error = OpConnect::Error.from_response(response)) raise error end end |