From aeda463147c844cd6e5444c60757177138690d6f Mon Sep 17 00:00:00 2001 From: yutak23 Date: Tue, 19 Mar 2024 19:53:44 +0900 Subject: [PATCH] docs: add explanation for onMaxRetryTimesExceeded --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 243ea6e..5bf3076 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ client | shouldResetTimeout | `Boolean` | false | Defines if the timeout should be reset between retries | | retryDelay | `Function` | `function noDelay() { return 0; }` | A callback to further control the delay in milliseconds between retried requests. By default there is no delay between retries. Another option is exponentialDelay ([Exponential Backoff](https://developers.google.com/analytics/devguides/reporting/core/v3/errors#backoff)). The function is passed `retryCount` and `error`. | | onRetry | `Function` | `function onRetry(retryCount, error, requestConfig) { return; }` | A callback to notify when a retry is about to occur. Useful for tracing and you can any async process for example refresh a token on 401. By default nothing will occur. The function is passed `retryCount`, `error`, and `requestConfig`. | +| onMaxRetryTimesExceeded | `Function` | `function onMaxRetryTimesExceeded(error, retryCount) { return; }` | After all the retries are failed, this callback will be called with the last error before throwing the error. | ## Testing