diff --git a/README.md b/README.md index ed243f7d..7a8177e5 100644 --- a/README.md +++ b/README.md @@ -604,6 +604,18 @@ Retries use exponential backoff with jitter: approximately 200–240 ms before the first retry and 400–480 ms before the second. A longer `Retry-After` header is honored. The request timeout is reset for each attempt. +Retries are configured per client. If your application has its own retry +behavior for some calls, create a second client with retries disabled and send +those calls through it, while other calls keep the default retries: + +```ts +const seam = Seam.fromApiKey('some-api-key') + +const seamWithoutRetries = Seam.fromApiKey('some-api-key', { + axiosRetryOptions: { retries: 0 }, +}) +``` + [axiosOptions]: https://axios-http.com/docs/config_defaults [axiosRetryOptions]: https://github.com/softonic/axios-retry diff --git a/package-lock.json b/package-lock.json index 05acfb02..89394ba7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@seamapi/cli": "0.49.0", - "@seamapi/http": "2.46.0", + "@seamapi/http": "2.48.0", "@seamapi/webhook": "1.5.0" }, "bin": { @@ -3440,9 +3440,9 @@ } }, "node_modules/@seamapi/http": { - "version": "2.46.0", - "resolved": "https://registry.npmjs.org/@seamapi/http/-/http-2.46.0.tgz", - "integrity": "sha512-tMH6gXcUe7hg4TrTFlSG+sXYkUgBkpyfpTRqay4AUsVZ2EBapiMCVtB3iOQ+rim8x5rpJZUNDw2gOp9a1iKHSg==", + "version": "2.48.0", + "resolved": "https://registry.npmjs.org/@seamapi/http/-/http-2.48.0.tgz", + "integrity": "sha512-jPwaVth5DoJVVWkOfkJeVJ4QOnZzfvsMvGz1FNjjkcnYXrYNSH9jMOHpvoKAyROiDTxcRw4Ihhhz3SWLtgsiAQ==", "license": "MIT", "dependencies": { "@seamapi/url-search-params-serializer": "^3.0.3", diff --git a/package.json b/package.json index 880f5a6a..889e9add 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "packageManager": "npm@11.19.0", "dependencies": { "@seamapi/cli": "0.49.0", - "@seamapi/http": "2.46.0", + "@seamapi/http": "2.48.0", "@seamapi/webhook": "1.5.0" }, "devDependencies": {