Docs / Errors

PROJECT_QUOTA_EXCEEDED

429Project quota exceeded

Why it happens

All the keys of a project share one quota: 3,600 requests per hour and 300 distinct masjids per day by default. The hourly window resets on the hour, the daily one at midnight UTC.

What to do

  • Wait for Retry-After: the response says how many seconds until the window resets. Do not retry before.
  • Cache on your side. Prayer times change once a day: fetch the month once, not on every screen view.
  • Ask for more: the response's quotaIncreaseUrl opens the request form for this project.

Example response

http
HTTP/1.1 429 · Retry-After: 1240
{
  "type": "https://hub.masjidbox.com/docs/errors/PROJECT_QUOTA_EXCEEDED",
  "title": "Project quota exceeded",
  "status": 429,
  "detail": "The project's quota is used up until the delay in Retry-After; `quotaIncreaseUrl` asks for more.",
  "instance": "/v1/masjids/msj_abc123defg",
  "code": "PROJECT_QUOTA_EXCEEDED",
  "requestId": "req_8f14e45fceea167a5a36dedd4bea2543",
  "requestLogUrl": "https://hub.masjidbox.com/console/logs/req_8f14e45fceea167a5a36dedd4bea2543",
  "quotaIncreaseUrl": "https://hub.masjidbox.com/console/projects/prj_123/quota/increase"
}