Exception: Comet::APIResponseError
- Inherits:
-
StandardError
- Object
- StandardError
- Comet::APIResponseError
- Defined in:
- lib/api_response_error.rb,
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
-
#detail ⇒ Object
readonly
Returns the value of attribute detail.
Instance Method Summary collapse
-
#initialize(carm) ⇒ APIResponseError
constructor
A new instance of APIResponseError.
Constructor Details
#initialize(carm) ⇒ APIResponseError
Returns a new instance of APIResponseError.
20 21 22 23 24 |
# File 'lib/api_response_error.rb', line 20 def initialize(carm) @detail = carm super("#{carm.message} (#{carm.status})") end |
Instance Attribute Details
#detail ⇒ Object (readonly)
Returns the value of attribute detail.
18 19 20 |
# File 'lib/api_response_error.rb', line 18 def detail @detail end |