Exception: HeapAPI::ApiError

Inherits:
Error
  • Object
show all
Defined in:
lib/heap/errors.rb

Overview

Raised when the Heap API server returns an error response.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ 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

#responseFaraday::Response (readonly)



17
18
19
# File 'lib/heap/errors.rb', line 17

def response
  @response
end