Exception: Anthropic::Errors::APIConnectionError

Inherits:
APIError
  • Object
show all
Defined in:
lib/anthropic/errors.rb

Direct Known Subclasses

APITimeoutError

Instance Attribute Summary collapse

Attributes inherited from APIError

#url

Instance Method Summary collapse

Constructor Details

#initialize(url:, status: nil, body: nil, request: nil, response: nil, message: "Connection error.") ⇒ APIConnectionError

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 APIConnectionError.

Parameters:

  • url (URI::Generic)
  • status (nil) (defaults to: nil)
  • body (nil) (defaults to: nil)
  • request (nil) (defaults to: nil)
  • response (nil) (defaults to: nil)
  • message (String, nil) (defaults to: "Connection error.")


81
82
83
84
85
86
87
88
89
90
# File 'lib/anthropic/errors.rb', line 81

def initialize(
  url:,
  status: nil,
  body: nil,
  request: nil,
  response: nil,
  message: "Connection error."
)
  super
end

Instance Attribute Details

#bodynil

Returns:

  • (nil)


# File 'lib/anthropic/errors.rb', line 69

#statusnil

Returns:

  • (nil)


# File 'lib/anthropic/errors.rb', line 65