Exception: Octoryn::APIError
- Defined in:
- lib/octoryn/errors.rb
Overview
A normalized non-success response from the Octoryn API.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#error_type ⇒ Object
readonly
Returns the value of attribute error_type.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status:, message:, code: nil, error_type: nil, request_id: nil, retry_after: nil) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(status:, message:, code: nil, error_type: nil, request_id: nil, retry_after: nil) ⇒ APIError
Returns a new instance of APIError.
10 11 12 13 14 15 16 17 18 |
# File 'lib/octoryn/errors.rb', line 10 def initialize(status:, message:, code: nil, error_type: nil, request_id: nil, retry_after: nil) super() @status = status @code = code @error_type = error_type @request_id = request_id @retry_after = retry_after end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
8 9 10 |
# File 'lib/octoryn/errors.rb', line 8 def code @code end |
#error_type ⇒ Object (readonly)
Returns the value of attribute error_type.
8 9 10 |
# File 'lib/octoryn/errors.rb', line 8 def error_type @error_type end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
8 9 10 |
# File 'lib/octoryn/errors.rb', line 8 def request_id @request_id end |
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
8 9 10 |
# File 'lib/octoryn/errors.rb', line 8 def retry_after @retry_after end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/octoryn/errors.rb', line 8 def status @status end |