Exception: TeslaAPI::Errors::InvalidResponse
- Inherits:
-
StandardError
- Object
- StandardError
- TeslaAPI::Errors::InvalidResponse
- Defined in:
- lib/tesla-api/errors.rb
Overview
Thrown when the response is invalid (non 200-OK HTTP result)
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Response object from httpclient.
Instance Method Summary collapse
-
#initialize(response) ⇒ InvalidResponse
constructor
A new instance of InvalidResponse.
- #to_s ⇒ Object
Constructor Details
#initialize(response) ⇒ InvalidResponse
Returns a new instance of InvalidResponse.
31 32 33 |
# File 'lib/tesla-api/errors.rb', line 31 def initialize(response) @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Response object from httpclient
29 30 31 |
# File 'lib/tesla-api/errors.rb', line 29 def response @response end |
Instance Method Details
#to_s ⇒ Object
35 36 37 |
# File 'lib/tesla-api/errors.rb', line 35 def to_s "Invalid Response: #{response.inspect}" end |