Exception: XIVAPI::Errors::RequestError
- Inherits:
-
StandardError
- Object
- StandardError
- XIVAPI::Errors::RequestError
- Defined in:
- lib/xivapi/errors.rb
Overview
Standard request error
Instance Method Summary collapse
-
#initialize(response) ⇒ RequestError
constructor
A new instance of RequestError.
Constructor Details
#initialize(response) ⇒ RequestError
Returns a new instance of RequestError
6 7 8 9 10 11 12 13 14 |
# File 'lib/xivapi/errors.rb', line 6 def initialize(response) if response.headers[:content_type] =~ /json/ = JSON.parse(response)['Message'] else = 'Error contacting the API.' end super() end |