Exception: ChatGPT::APIError
- Defined in:
- lib/chatgpt/errors.rb
Direct Known Subclasses
AuthenticationError, InvalidRequestError, RateLimitError, TokenLimitError
Instance Attribute Summary collapse
-
#error_type ⇒ Object
readonly
Returns the value of attribute error_type.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(message = nil, status_code = nil, error_type = nil) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(message = nil, status_code = nil, error_type = nil) ⇒ APIError
Returns a new instance of APIError.
10 11 12 13 14 |
# File 'lib/chatgpt/errors.rb', line 10 def initialize( = nil, status_code = nil, error_type = nil) @status_code = status_code @error_type = error_type super() end |
Instance Attribute Details
#error_type ⇒ Object (readonly)
Returns the value of attribute error_type.
8 9 10 |
# File 'lib/chatgpt/errors.rb', line 8 def error_type @error_type end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
8 9 10 |
# File 'lib/chatgpt/errors.rb', line 8 def status_code @status_code end |