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