There are 2 reasons a request can receive a 429 response. One for a per-second rate limit, and one for a per-day total limit.
But, the only way to potentially know which one you hit is to parse the message in the json. Could we possibly get an additional field added to the json error response maybe indicating which was hit?
{"code":429,
"limit": "daily", //other value could be "rate" for the per-second one
"message":"You have reached the maximum per-second rate limit for this API. Try again later."
}
In summary, it would be nice to âsubclassâ the 429 error if possible with a âwhich limitâ was hit.
Next request- mostly related. There is a âX-RateLimit-Remainingâ That only seems to be returned on 200 responses. It doesnât give us enough info to make proper rate limiting decisions. It would be nice if ALL responses contained something like these 3 examples:
429 response(per second exceeded)
"x-Ratelimit-category: heavy"
"X-RateLimit-daily-Remaining: 2000"
"x-ratelimit-daily-limit: 5000"
"x-ratelimit-rate-reset: 20" // Means the 429 you just got exceeded the rate limit and you should wait 20s
I see via the Changelog that the response headers X-RateLimit-Category and X-RateLimit-Type have been added to 429 responses, but the documentation has not yet been updated accordingly. Could you specify what the possible values for these headers are?
The X-RateLimit-Category refers to the rate limit label of the API (value could be either Light, Medium, Heavy, Resource-intensive based on the API youâre calling). The X-RateLimit-Type indicates whether the Rate Limit is QPS (Query Per Second) or Daily-limit. We have added the examples in the table here: https://marketplace.zoom.us/docs/api-reference/rate-limits#best-practices-for-handling-errors
While exceeding the daily limit I got the following errors
data: {
code: 429,
message: 'You have exceeded the daily rate limit (100) of Meeting Create/Update API requests permitted for this particular user. You may resume these requests at GMT 00:00:00.'
}
headers: {
'x-ratelimit-category': 'Light',
'x-ratelimit-limit': '6000',
'x-ratelimit-remaining': '5851'
}
I donât see x-ratelimit-type set to Daily-limit.
Can you please confirm. Thank you.