Handling Errors
Every query returns a tuple instead of throwing. On failure, the first item isundefined, the second is the Error, and the third is the HTTP Response when the request reached the API.
Rate Limits
The content API (schema, list, and get) is rate limited to prevent abuse. The limits are the same on every plan.- Limits are approximate, because they are counted per Cloudflare location.
- Cached responses also count toward the limit.
- Different secret keys do not affect each other.
429, a Retry-After: 60 header, and the body { "error": "rate_limited" }.
The SDK does not retry automatically. Check the status and wait before trying again:
Temporary Failures
The API responds with503 and a Retry-After: 10 header when the failure is likely to clear up on its own:
- The API cannot read its stored data for a moment.
getcannot reach Notion because Notion is temporarily unavailable, and NotCMS does not have a synchronized copy of the page yet. When a copy exists,getreturns that copy instead.
Retry-After, then try again. You can handle 503 the same way as 429: