Exception: Cpro::ApiError
Direct Known Subclasses
AuthenticationError, AuthorizationError, NotFoundError, RateLimitError, RequestError, ServerError
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#correlation_id ⇒ Object
readonly
Returns the value of attribute correlation_id.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, status: nil, body: nil, correlation_id: nil) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(message, status: nil, body: nil, correlation_id: nil) ⇒ ApiError
Returns a new instance of ApiError.
11 12 13 14 15 16 |
# File 'lib/cpro/errors.rb', line 11 def initialize(, status: nil, body: nil, correlation_id: nil) @status = status @body = body @correlation_id = correlation_id super() end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
9 10 11 |
# File 'lib/cpro/errors.rb', line 9 def body @body end |
#correlation_id ⇒ Object (readonly)
Returns the value of attribute correlation_id.
9 10 11 |
# File 'lib/cpro/errors.rb', line 9 def correlation_id @correlation_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
9 10 11 |
# File 'lib/cpro/errors.rb', line 9 def status @status end |