Exception: Comet::APIResponseError
- Inherits:
-
StandardError
- Object
- StandardError
- Comet::APIResponseError
- 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
-
#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.
18 19 20 21 22 |
# File 'lib/comet/api_response_error.rb', line 18 def initialize(carm) @detail = carm super("#{carm.} (#{carm.status})") end |
Instance Attribute Details
#detail ⇒ Object (readonly)
Returns the value of attribute detail.
16 17 18 |
# File 'lib/comet/api_response_error.rb', line 16 def detail @detail end |