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.
66
67
68
69
70
71
72
73
|
# File 'lib/openai/errors.rb', line 66
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?
47
48
49
|
# File 'lib/openai/errors.rb', line 47
def body
@body
end
|
#code ⇒ String?
50
51
52
|
# File 'lib/openai/errors.rb', line 50
def code
@code
end
|
#param ⇒ String?
53
54
55
|
# File 'lib/openai/errors.rb', line 53
def param
@param
end
|
#status ⇒ Integer?
44
45
46
|
# File 'lib/openai/errors.rb', line 44
def status
@status
end
|
#type ⇒ String?
56
57
58
|
# File 'lib/openai/errors.rb', line 56
def type
@type
end
|
#url ⇒ URI::Generic
41
42
43
|
# File 'lib/openai/errors.rb', line 41
def url
@url
end
|