Skip to content

API ReferenceErrorsClass

MaxRetriesExceededError

Error thrown when a retried operation exhausts all retry attempts without succeeding. Wraps the last retryable error as the cause.

Extends

Constructors

Constructor

new MaxRetriesExceededError(maxRetries, cause?): MaxRetriesExceededError;

Parameters

ParameterType
maxRetriesnumber
cause?unknown

Returns

MaxRetriesExceededError

Overrides

BaseError.constructor

Properties

maxRetries

readonly maxRetries: number;

Methods

walk()

walk<T>(errorType): T | undefined;

Checks if the provided ErrorType is in the error hierarchy for the current error.

Type Parameters

Type ParameterDescription
T extends ErrorThe type of the error being searched for.

Parameters

ParameterTypeDescription
errorType(…args) => TThe error type to find.

Returns

T | undefined

The error, if it is found in the hierarchy, otherwise undefined.

Inherited from

BaseError.walk