Notion Common Errors
Overview
Quick reference for all Notion API error codes with exact HTTP statuses, error bodies, and fixes. The API returns errors as JSON with three fields:
{
"object": "error",
"status": 400,
"code": "validation_error",
"message": "Title is not a property that exists."
}
All requests require Authorization: Bearer $NOTION_TOKEN and Notion-Version: 2022-06-28 headers (2022-06-28 is the current stable API version — the header is required on every call).
This SKILL.md gives you the triage table and workflow. Two references carry the depth:
- references/error-codes.md — the full per-status playbook (401, 403, 404, 400, 429, 409, 500, 502/503) with error bodies, causes, and code fixes.
- references/examples.md — the full SDK error handler, the curl diagnostic script, and the non-HTTP client-side gotchas (rich text arrays, pagination, timeouts).
Prerequisites
@notionhq/client installed (npm install @notionhq/client)
NOTION_TOKEN environment variable set (internal integration token starting with ntn_ or secret_)
- Target pages/databases shared with the integration via the Connections menu
Instructions
Step 1: Identify the Error
- Read the JSON error body returned by the failed request.
- Note its HTTP
status and machine-readable code fields — those two values route you to the exact fix.
- If you only have logs,
Grep your application logs for the code field to recover the values.
Step 2: Match Error Code and Apply Fix
Use the Error Handling table below to see whether the error is retryable and the recommended action. For the exact error body, root cause, and copy-paste fix, open the matching section in references/error-codes.md. The four you will hit most:
- 404
object_not_found — the most common error. The page/database exists but is not shared with your integration. Fix via the ... → Connections menu; parent pages must be shared too.
- 401
unauthorized — token missing, malformed, expired, or revoked. Verify with curl .../v1/users/me; regenerate at notion.so/my-integrations.
- 400
validation_error — the broadest category, usually a wrong property name/type or a filter-type mismatch (e.g. status: filter used as text:). Retrieve the database schema first.
- 429
rate_limited — over 3 requests/sec/integration. Back off exponentially; the SDK retries automatically.
Step 3: Verify the Fix
Re-run the failing call, or use the three-probe curl diagnostic in references/examples.md to confirm status, token, and resource access independently.
Output
- Identified error cause from HTTP status and
code field
- Applied targeted fix from the matching section
- Verified resolution with test API call
Error Handling
| Code |
HTTP |
Error Name |
Retryable |
Recommended Action |
unauthorized |
401 |
Authentication failure |
No |
Regenerate token at notion.so/my-integrations |
restricted_resource |
403 |
Missing capability |
No |
Enable capability in integration settings |
object_not_found |
404 |
Not shared / not found |
No |
Share page with integration via Connections menu |
validation_error |
400 |
Malformed request |
No |
Fix request body — retrieve schema first |
rate_limited |
429 |
Rate limit exceeded |
Yes |
Respect Retry-After header, use exponential backoff |
conflict_error |
409 |
Concurrent modification |
Yes |
Retry after 1-2s, serialize writes to same object |
internal_server_error |
500 |
Notion server error |
Yes |
Retry with backoff, check status.notion.so |
service_unavailable |
502/503 |
Notion down |
Yes |
Wait and retry, check status.notion.so |
gateway_timeout |
504 |
Request timeout |
Yes |
Retry, reduce query complexity or page size |
Each row maps to a full walkthrough in references/error-codes.md.
Examples
Start with the fastest diagnostic — a single curl to confirm your token is valid and the integration is reachable:
curl -s https://api.notion.com/v1/users/me \
-H "Authorization: Bearer ${NOTION_TOKEN}" \
-H "Notion-Version: 2022-06-28" | jq '{id, type, name}'
A valid token returns your integration bot user. From there:
- Full three-probe diagnostic (status → token → database access): references/examples.md
- A single SDK
catch block branching on every error code: references/examples.md
- Client-side shape gotchas that masquerade as
validation_error (rich text arrays, block children, pagination, timeouts): references/examples.md
Resources
Next Steps
For comprehensive debugging workflows, see notion-debug-bundle. For rate limit strategies at scale, see notion-rate-limits.
1---2name: notion-common-errors3description: Diagnose and fix Notion API errors by HTTP status code and error code. Use when encountering Notion errors, debugging failed requests, or troubleshooting integration access, rate limiting, or validation issues. Trigger with phrases like "notion error", "fix notion", "notion not working", "debug notion", "notion 400", "notion 429".4license: MIT5---6# Notion Common Errors
7
8## Overview
9
10Quick reference for all Notion API error codes with exact HTTP statuses, error bodies, and fixes. The API returns errors as JSON with three fields:
11
12```json
13{
14 "object": "error",
15 "status": 400,
16 "code": "validation_error",
17 "message": "Title is not a property that exists."
18}
19```
20
21All requests require `Authorization: Bearer $NOTION_TOKEN` and `Notion-Version: 2022-06-28` headers (`2022-06-28` is the current stable API version — the header is required on every call).
22
23This SKILL.md gives you the triage table and workflow. Two references carry the depth:
24
25- **[references/error-codes.md](references/error-codes.md)** — the full per-status playbook (401, 403, 404, 400, 429, 409, 500, 502/503) with error bodies, causes, and code fixes.
26- **[references/examples.md](references/examples.md)** — the full SDK error handler, the curl diagnostic script, and the non-HTTP client-side gotchas (rich text arrays, pagination, timeouts).
27
28## Prerequisites
29
30- `@notionhq/client` installed (`npm install @notionhq/client`)
31- `NOTION_TOKEN` environment variable set (internal integration token starting with `ntn_` or `secret_`)
32- Target pages/databases shared with the integration via the Connections menu
33
34## Instructions
35
36### Step 1: Identify the Error
37
381. Read the JSON error body returned by the failed request.
392. Note its HTTP `status` and machine-readable `code` fields — those two values route you to the exact fix.
403. If you only have logs, `Grep` your application logs for the `code` field to recover the values.
41
42### Step 2: Match Error Code and Apply Fix
43
44Use the Error Handling table below to see whether the error is retryable and the recommended action. For the exact error body, root cause, and copy-paste fix, open the matching section in **[references/error-codes.md](references/error-codes.md)**. The four you will hit most:
45
46- **404 `object_not_found`** — the most common error. The page/database exists but is not shared with your integration. Fix via the `...` → **Connections** menu; parent pages must be shared too.
47- **401 `unauthorized`** — token missing, malformed, expired, or revoked. Verify with `curl .../v1/users/me`; regenerate at [notion.so/my-integrations](https://www.notion.so/my-integrations).
48- **400 `validation_error`** — the broadest category, usually a wrong property name/type or a filter-type mismatch (e.g. `status:` filter used as `text:`). Retrieve the database schema first.
49- **429 `rate_limited`** — over 3 requests/sec/integration. Back off exponentially; the SDK retries automatically.
50
51### Step 3: Verify the Fix
52
53Re-run the failing call, or use the three-probe curl diagnostic in **[references/examples.md](references/examples.md)** to confirm status, token, and resource access independently.
54
55## Output
56
57- Identified error cause from HTTP status and `code` field
58- Applied targeted fix from the matching section
59- Verified resolution with test API call
60
61## Error Handling
62
63| Code | HTTP | Error Name | Retryable | Recommended Action |
64| ------ | ------ | ------------ | ----------- | ------------------- |
65| `unauthorized` | 401 | Authentication failure | No | Regenerate token at notion.so/my-integrations |
66| `restricted_resource` | 403 | Missing capability | No | Enable capability in integration settings |
67| `object_not_found` | 404 | Not shared / not found | No | Share page with integration via Connections menu |
68| `validation_error` | 400 | Malformed request | No | Fix request body — retrieve schema first |
69| `rate_limited` | 429 | Rate limit exceeded | Yes | Respect `Retry-After` header, use exponential backoff |
70| `conflict_error` | 409 | Concurrent modification | Yes | Retry after 1-2s, serialize writes to same object |
71| `internal_server_error` | 500 | Notion server error | Yes | Retry with backoff, check status.notion.so |
72| `service_unavailable` | 502/503 | Notion down | Yes | Wait and retry, check status.notion.so |
73| `gateway_timeout` | 504 | Request timeout | Yes | Retry, reduce query complexity or page size |
74
75Each row maps to a full walkthrough in [references/error-codes.md](references/error-codes.md).
76
77## Examples
78
79Start with the fastest diagnostic — a single curl to confirm your token is valid and the integration is reachable:
80
81```bash
82curl -s https://api.notion.com/v1/users/me \
83 -H "Authorization: Bearer ${NOTION_TOKEN}" \
84 -H "Notion-Version: 2022-06-28" | jq '{id, type, name}'
85```
86
87A valid token returns your integration bot user. From there:
88
89- Full three-probe diagnostic (status → token → database access): [references/examples.md](references/examples.md)
90- A single SDK `catch` block branching on every error code: [references/examples.md](references/examples.md)
91- Client-side shape gotchas that masquerade as `validation_error` (rich text arrays, block children, pagination, timeouts): [references/examples.md](references/examples.md)
92
93## Resources
94
95- [Notion API Error Codes](https://developers.notion.com/reference/errors)
96- [Request Limits & Rate Limiting](https://developers.notion.com/reference/request-limits)
97- [Notion Status Page](https://status.notion.so)
98- [API Introduction](https://developers.notion.com/reference/intro)
99- [Working with Databases](https://developers.notion.com/docs/working-with-databases)
100- [@notionhq/client npm](https://www.npmjs.com/package/@notionhq/client)
101
102## Next Steps
103
104For comprehensive debugging workflows, see `notion-debug-bundle`. For rate limit strategies at scale, see `notion-rate-limits`.