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