Exception: EmpireAvenue::Error::ClientError
- Inherits:
-
EmpireAvenue::Error
- Object
- StandardError
- EmpireAvenue::Error
- EmpireAvenue::Error::ClientError
- Defined in:
- lib/empireavenue/error/client_error.rb
Overview
Raised when EmpireAvenue returns a 4xx HTTP status code or there’s an error in Faraday
Instance Attribute Summary
Attributes inherited from EmpireAvenue::Error
Class Method Summary collapse
-
.from_response(response = {}) ⇒ EmpireAvenue::Error
Create a new error from an HTTP environment.
Methods inherited from EmpireAvenue::Error
#backtrace, descendants, errors, #initialize
Constructor Details
This class inherits a constructor from EmpireAvenue::Error
Class Method Details
.from_response(response = {}) ⇒ EmpireAvenue::Error
Create a new error from an HTTP environment
12 13 14 |
# File 'lib/empireavenue/error/client_error.rb', line 12 def self.from_response(response={}) new(parse_error(response[:body]), response[:response_headers]) end |