Skip to content

Commit 4c16724

Browse files
authored
Update rate-limiting.mdx
add context
1 parent d8fe544 commit 4c16724

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/content/docs/browser-rendering/how-to/rate-limiting.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ sidebar:
77

88
## Example: Handling 429 Rate Limits with Retry-After Header
99

10+
When you make too many requests in a short period of time, Browser Rendering will respond with HTTP status code `429 Too Many Requests`.
11+
The response includes a `Retry-After` header, which specifies how many seconds to wait before retrying. You can view your account's rate limits on the Limits(/browser-rendering/platform/limits/) page.
12+
13+
The example below demonstrates how to handle rate limiting gracefully by reading the `Retry-After` value and retrying the request after that delay.
14+
1015
```js
1116
const response = await fetch('https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-rendering/content', {
1217
method: 'POST',

0 commit comments

Comments
 (0)