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, headers: 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.
70
71
72
73
74
75
76
77
78
|
# File 'lib/openai/errors.rb', line 70
def initialize(url:, status: nil, headers: nil, body: nil, request: nil, response: nil, message: nil)
@url = url
@status = status
@headers =
@body = body
@request = request
@response = response
super(message)
end
|
Instance Attribute Details
#body ⇒ Object?
50
51
52
|
# File 'lib/openai/errors.rb', line 50
def body
@body
end
|
#code ⇒ String?
53
54
55
|
# File 'lib/openai/errors.rb', line 53
def code
@code
end
|
47
48
49
|
# File 'lib/openai/errors.rb', line 47
def
@headers
end
|
#param ⇒ String?
56
57
58
|
# File 'lib/openai/errors.rb', line 56
def param
@param
end
|
#status ⇒ Integer?
44
45
46
|
# File 'lib/openai/errors.rb', line 44
def status
@status
end
|
#type ⇒ String?
59
60
61
|
# File 'lib/openai/errors.rb', line 59
def type
@type
end
|
#url ⇒ URI::Generic
41
42
43
|
# File 'lib/openai/errors.rb', line 41
def url
@url
end
|