Skip to content

Commit fb2cadc

Browse files
committed
docs(readme): describe rate-limit retries
1 parent 460f495 commit fb2cadc

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,10 @@ Everything the SDK throws is a `StackOneError`:
415415

416416
`timeout` (milliseconds, default 60000) bounds every MCP listing and `tools/call`, and account discovery.
417417

418+
### Rate limits
419+
420+
Every request the SDK makes (`GET /accounts` and every MCP request, `tools/call` included) is retried when the API answers `429 Too Many Requests`: up to 3 more times, waiting for the response's `Retry-After` (capped at 30s), or 1s, 2s, then 4s with jitter when there is none. Each retry logs a warning. A request still rate limited after that throws `StackOneAPIError` with `statusCode` `429`, and fails the whole `fetchTools()` or `search()` call: unlike a dead account, a rate-limited one is never skipped, so you never get a partial catalog. The retries' waits count towards `timeout`.
421+
418422
### Custom Base URL
419423

420424
```typescript

0 commit comments

Comments
 (0)