Exception: Anthropic::Errors::RetryableError

Inherits:
Error
  • Object
show all
Defined in:
lib/anthropic/errors.rb,
sig/anthropic/errors.rbs

Overview

Raise from a middleware to explicitly opt a middleware-origin failure into the SDK's retry loop. Retry classification walks Exception#cause, so a middleware may wrap with its own error class and still have the SDK retry as long as RetryableError is reachable via the cause chain.

Examples:

begin
  backend.call
rescue BackendUnavailable => e
  raise Anthropic::Errors::RetryableError, cause: e
end

Instance Attribute Summary

Attributes inherited from Error

#cause