Exception: Clamp::Analytics::HTTPError

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

Overview

Raised when the ingestion API returns a non-2xx response.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status_code, body) ⇒ HTTPError

Returns a new instance of HTTPError.



15
16
17
18
19
# File 'lib/clamp_analytics/errors.rb', line 15

def initialize(status_code, body)
  @status_code = status_code
  @body = body
  super("clamp_analytics: #{status_code} #{body}")
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



13
14
15
# File 'lib/clamp_analytics/errors.rb', line 13

def body
  @body
end

#status_codeObject (readonly)

Returns the value of attribute status_code.



13
14
15
# File 'lib/clamp_analytics/errors.rb', line 13

def status_code
  @status_code
end