RetryContext
interface RetryContext {
attempt: number;
extensionName?: string;
functionName: string;
integrationName: string;
logger: LoggerInterface;
retries: number;
}Properties
| Name | Required | Type | Description |
|---|---|---|---|
attempt | Required | number | 1-based number of the retry about to be performed (first retry is 1). |
extensionName | Optional | string | The extension name when a namespaced extension method is called; undefined for the integration's own methods and non-namespaced extensions. |
functionName | Required | string | The unified method being retried, e.g. "getProduct". |
integrationName | Required | string | The integration key from middleware.config.ts, e.g. "commerce". |
logger | Required | LoggerInterface | Request-scoped Alokai logger, for logging retry decisions from a custom retryCondition. |
retries | Required | number | Total number of retries allowed by the policy - the attempt budget. attempt never exceeds this, so attempt === retries is the last retry. |