Exception: Amplitude::APIError
- Defined in:
- lib/amplitude/errors.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#code ⇒ Object
Returns the value of attribute code.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(response) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(response) ⇒ APIError
Returns a new instance of APIError.
20 21 22 23 24 25 |
# File 'lib/amplitude/errors.rb', line 20 def initialize(response) super('The HTTP API returned an error') self.url = response.request.path.to_s self.code = response.code self.body = response.body end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
18 19 20 |
# File 'lib/amplitude/errors.rb', line 18 def body @body end |
#code ⇒ Object
Returns the value of attribute code.
18 19 20 |
# File 'lib/amplitude/errors.rb', line 18 def code @code end |
#url ⇒ Object
Returns the value of attribute url.
18 19 20 |
# File 'lib/amplitude/errors.rb', line 18 def url @url end |