Exception: Tenax::RetryLimitExceeded

Inherits:
ExecutionError show all
Defined in:
lib/tenax/errors.rb

Overview

Raised when an operation has exhausted its retry budget. The underlying error from the final attempt is preserved as #cause.

Examples:

rescue and inspect the underlying failure

begin
  Tenax.run(:stripe) { call_api }.value!
rescue Tenax::RetryLimitExceeded => e
  logger.error("retry exhausted", profile: e.profile_name,
               attempts: e.attempts, underlying: e.cause)
end

Instance Attribute Summary

Attributes inherited from ExecutionError

#attempts, #profile_name

Instance Method Summary collapse

Constructor Details

#initialize(profile_name:, attempts:) ⇒ RetryLimitExceeded

Returns a new instance of RetryLimitExceeded.



77
78
79
80
81
82
83
# File 'lib/tenax/errors.rb', line 77

def initialize(profile_name:, attempts:)
  super(
    "retry limit exceeded for profile #{profile_name.inspect} after #{attempts} attempt(s)",
    profile_name: profile_name,
    attempts: attempts
  )
end