Skip to content

Commit 7b2b238

Browse files
committed
feat(ipa0114): add rate limiting guidelines to errors IPA
1 parent 9ba0e12 commit 7b2b238

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

ipa/general/0114.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,25 @@ are treated as `404 Not Found` rather than `400 Bad Request`.
5959

6060
:::
6161

62+
### Rate Limiting
63+
64+
- APIs **must** document the `429 Too Many Requests` status code for endpoints
65+
that implement rate limiting.
66+
- APIs **must** return `429 Too Many Requests` when a client exceeds the allowed
67+
request rate.
68+
- APIs **must** include the `Retry-After` HTTP response header when returning
69+
`429 Too Many Requests` to indicate when the client can retry the request.
70+
- The `Retry-After` header value **must** be expressed as time in seconds
71+
until the next token is available.
72+
- APIs **should** include rate limit information in response headers to help
73+
clients manage their request rates proactively:
74+
- `RateLimit-Limit`: The maximum number of requests allowed in the current
75+
rate limit window (bucket capacity)
76+
- `RateLimit-Remaining`: The number of requests remaining in the current rate
77+
limit window (remaining tokens)
78+
79+
:::
80+
6281
### API Error Format
6382

6483
```json

0 commit comments

Comments
 (0)