Exception: AILabTools::APIError
- Defined in:
- lib/ailabtools/errors.rb
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#error_detail ⇒ Object
readonly
Returns the value of attribute error_detail.
-
#log_id ⇒ Object
readonly
Returns the value of attribute log_id.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(message, status_code:, request_id: nil, log_id: nil, error_code: nil, error_detail: nil, raw: nil) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(message, status_code:, request_id: nil, log_id: nil, error_code: nil, error_detail: nil, raw: nil) ⇒ APIError
Returns a new instance of APIError.
11 12 13 14 15 16 17 18 19 |
# File 'lib/ailabtools/errors.rb', line 11 def initialize(, status_code:, request_id: nil, log_id: nil, error_code: nil, error_detail: nil, raw: nil) super() @status_code = status_code @request_id = request_id @log_id = log_id @error_code = error_code @error_detail = error_detail @raw = raw end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
9 10 11 |
# File 'lib/ailabtools/errors.rb', line 9 def error_code @error_code end |
#error_detail ⇒ Object (readonly)
Returns the value of attribute error_detail.
9 10 11 |
# File 'lib/ailabtools/errors.rb', line 9 def error_detail @error_detail end |
#log_id ⇒ Object (readonly)
Returns the value of attribute log_id.
9 10 11 |
# File 'lib/ailabtools/errors.rb', line 9 def log_id @log_id end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
9 10 11 |
# File 'lib/ailabtools/errors.rb', line 9 def raw @raw end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
9 10 11 |
# File 'lib/ailabtools/errors.rb', line 9 def request_id @request_id end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
9 10 11 |
# File 'lib/ailabtools/errors.rb', line 9 def status_code @status_code end |