Exception: Comet::APIResponseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/comet/api_response_error.rb

Overview

APIResponseError is a custom exception class that wraps the Comet::CometAPIResponseMessage type. These represent application-level error responses from the Comet Server API. Network-level error responses should be caught using the Net::HTTP error types.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(carm) ⇒ APIResponseError

Returns a new instance of APIResponseError.



18
19
20
21
22
# File 'lib/comet/api_response_error.rb', line 18

def initialize(carm)
  @detail = carm

  super("#{carm.message} (#{carm.status})")
end

Instance Attribute Details

#detailObject (readonly)

Returns the value of attribute detail.



16
17
18
# File 'lib/comet/api_response_error.rb', line 16

def detail
  @detail
end