Exception: Creem::ApiError
Direct Known Subclasses
AuthenticationError, BadRequestError, NotFoundError, RateLimitError, ServerError
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message = nil, status: nil, body: nil) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(message = nil, status: nil, body: nil) ⇒ ApiError
Returns a new instance of ApiError.
11 12 13 14 15 |
# File 'lib/creem/errors.rb', line 11 def initialize( = nil, status: nil, body: nil) @status = status @body = body super( || "API request failed with status #{status}") end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
9 10 11 |
# File 'lib/creem/errors.rb', line 9 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
9 10 11 |
# File 'lib/creem/errors.rb', line 9 def status @status end |