Skip to content

Commit

Permalink
Sync sdk-middleware-http docs with implementation (#1846)
Browse files Browse the repository at this point in the history
The actual implementation defaults to 10 retries.

See:
https://github.com/commercetools/nodejs/blob/master/packages/sdk-middleware-http/src/http.js#L64

Co-authored-by: Ajima Chukwuemeka <[email protected]>
  • Loading branch information
bianucci and ajimae authored May 29, 2024
1 parent f8e1857 commit 95aa5be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/sdk/api/sdkMiddlewareHttp.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The HTTP middleware can run in either a browser or Node.js environment. For Node
5. `maskSensitiveHeaderData` _(Boolean)_: flag to mask sensitie data in the header. e.g. Authorization token
6. `enableRetry` _(Boolean)_: flag to enable retry on network errors and `500` response. (Default: false)
7. `retryCodes` - _(Array)_: array of `statusCodes` [`numbers`] and error code or messages [`string`] for retring requests when the statusCodes and/or error message/code matches an entry in the list.
8. `maxRetries` _(Number)_: number of times to retry the request before failing the request. (Default: 50)
8. `maxRetries` _(Number)_: number of times to retry the request before failing the request. (Default: 10)
9. `retryDelay` _(Number)_: amount of milliseconds to wait before retrying the next request. (Default: 200)
10. `backoff` _(Boolean)_: activates exponential backoff. Recommended to prevent spamming of the server. (Default: true)
11. `maxDelay` _(Number)_: The maximum duration (milliseconds) to wait before retrying, useful if the delay time grew exponentially more than reasonable
Expand Down

0 comments on commit 95aa5be

Please sign in to comment.