Exception: HeapAPI::ApiError
Overview
Raised when the Heap API server returns an error response.
Instance Attribute Summary collapse
-
#response ⇒ Faraday::Response
readonly
Response the error response returned by the Heap analytics server.
Instance Method Summary collapse
-
#initialize(response) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(response) ⇒ ApiError
Returns a new instance of ApiError.
9 10 11 12 13 |
# File 'lib/heap/errors.rb', line 9 def initialize(response) @response = response super "Heap API server error: #{response.status} #{response.body}" end |
Instance Attribute Details
#response ⇒ Faraday::Response (readonly)
Returns response the error response returned by the Heap analytics server.
17 18 19 |
# File 'lib/heap/errors.rb', line 17 def response @response end |