Exception: Anthropic::Errors::APIError
- Inherits:
-
Error
- Object
- StandardError
- Error
- Anthropic::Errors::APIError
show all
- Defined in:
- lib/anthropic/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.
72
73
74
75
76
77
78
79
80
|
# File 'lib/anthropic/errors.rb', line 72
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?
61
62
63
|
# File 'lib/anthropic/errors.rb', line 61
def body
@body
end
|
58
59
60
|
# File 'lib/anthropic/errors.rb', line 58
def
@headers
end
|
#status ⇒ Integer?
55
56
57
|
# File 'lib/anthropic/errors.rb', line 55
def status
@status
end
|
#url ⇒ URI::Generic
52
53
54
|
# File 'lib/anthropic/errors.rb', line 52
def url
@url
end
|