Exception: OpenAI::Errors::APIError
- Inherits:
-
Error
- Object
- StandardError
- Error
- OpenAI::Errors::APIError
show all
- Defined in:
- lib/openai/errors.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(url:, status: nil, body: nil, request: nil, response: nil, message: nil) ⇒ APIError
This method is part of a private API.
You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of APIError.
41
42
43
44
45
46
47
48
|
# File 'lib/openai/errors.rb', line 41
def initialize(url:, status: nil, body: nil, request: nil, response: nil, message: nil)
@url = url
@status = status
@body = body
@request = request
@response = response
super(message)
end
|
Instance Attribute Details
#body ⇒ Object?
22
23
24
|
# File 'lib/openai/errors.rb', line 22
def body
@body
end
|
#code ⇒ String?
25
26
27
|
# File 'lib/openai/errors.rb', line 25
def code
@code
end
|
#param ⇒ String?
28
29
30
|
# File 'lib/openai/errors.rb', line 28
def param
@param
end
|
#status ⇒ Integer?
19
20
21
|
# File 'lib/openai/errors.rb', line 19
def status
@status
end
|
#type ⇒ String?
31
32
33
|
# File 'lib/openai/errors.rb', line 31
def type
@type
end
|
#url ⇒ URI::Generic
16
17
18
|
# File 'lib/openai/errors.rb', line 16
def url
@url
end
|