Exception: WebinarJam::APIError
- Defined in:
- lib/webinarjam/errors.rb
Overview
Raised when the API returns an error, either as a non-2xx HTTP status or
as a 2xx response whose JSON body carries "status": "error".
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
Instance Method Summary collapse
-
#initialize(message, http_status: nil, body: nil) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(message, http_status: nil, body: nil) ⇒ APIError
Returns a new instance of APIError.
14 15 16 17 18 |
# File 'lib/webinarjam/errors.rb', line 14 def initialize(, http_status: nil, body: nil) @http_status = http_status @body = body super() end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
12 13 14 |
# File 'lib/webinarjam/errors.rb', line 12 def body @body end |
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
12 13 14 |
# File 'lib/webinarjam/errors.rb', line 12 def http_status @http_status end |