[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M793HMM0A5K14M9XKW76DN5X":3,"skill-same:01M793HMM0A5K14M9XKW76DN5X":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M793HMM0A5K14M9XKW76DN5X","notion-common-errors",null,"Diagnose and fix Notion API errors by HTTP status code and error code.\nUse when encountering Notion errors, debugging failed requests,\nor troubleshooting integration access, rate limiting, or validation issues.\nTrigger with phrases like \"notion error\", \"fix notion\",\n\"notion not working\", \"debug notion\", \"notion 400\", \"notion 429\".","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--notion-pack--notion-common-errors\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: notion-common-errors\ndescription: |\n  Diagnose and fix Notion API errors by HTTP status code and error code.\n  Use when encountering Notion errors, debugging failed requests,\n  or troubleshooting integration access, rate limiting, or validation issues.\n  Trigger with phrases like \"notion error\", \"fix notion\",\n  \"notion not working\", \"debug notion\", \"notion 400\", \"notion 429\".\nallowed-tools: Read, Grep, Bash(curl:*)\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ntags: [saas, productivity, notion]\ncompatible-with: claude-code\n---\n\n# Notion Common Errors\n\n## Overview\n\nQuick reference for all Notion API error codes with exact HTTP statuses, error bodies, and fixes. The API returns errors as JSON with three fields:\n\n```json\n{\n  \"object\": \"error\",\n  \"status\": 400,\n  \"code\": \"validation_error\",\n  \"message\": \"Title is not a property that exists.\"\n}\n```\n\nAll requests require `Authorization: Bearer \u003Ctoken>` and `Notion-Version: 2022-06-28` headers.\n\n## Prerequisites\n\n- `@notionhq\u002Fclient` installed (`npm install @notionhq\u002Fclient`)\n- `NOTION_TOKEN` environment variable set (internal integration token starting with `ntn_` or `secret_`)\n- Target pages\u002Fdatabases shared with the integration via the Connections menu\n\n## Instructions\n\n### Step 1: Identify the Error\n\nRun the diagnostic script below or check your application logs. Match the HTTP status and `code` field to the sections that follow.\n\n### Step 2: Match Error Code and Apply Fix\n\n---\n\n### 401 — `unauthorized`\n\n```json\n{\"object\": \"error\", \"status\": 401, \"code\": \"unauthorized\", \"message\": \"API token is invalid.\"}\n```\n\n**Cause:** Token is missing, malformed, expired, or revoked.\n\n**Fix:**\n\n```bash\n# Verify token is set\necho ${NOTION_TOKEN:+SET}\n\n# Test directly\ncurl -s https:\u002F\u002Fapi.notion.com\u002Fv1\u002Fusers\u002Fme \\\n  -H \"Authorization: Bearer ${NOTION_TOKEN}\" \\\n  -H \"Notion-Version: 2022-06-28\" | jq .\n```\n\nIf the response shows your integration bot user, the token is valid. Otherwise regenerate at [notion.so\u002Fmy-integrations](https:\u002F\u002Fwww.notion.so\u002Fmy-integrations). Tokens starting with `secret_` are legacy format — new integrations use `ntn_` prefix.\n\n---\n\n### 403 — `restricted_resource`\n\n```json\n{\"object\": \"error\", \"status\": 403, \"code\": \"restricted_resource\", \"message\": \"Insufficient permissions for this resource.\"}\n```\n\n**Cause:** The integration exists and the page is shared, but the integration lacks the required capability (read content, update content, insert content, read comments).\n\n**Fix:** Go to [notion.so\u002Fmy-integrations](https:\u002F\u002Fwww.notion.so\u002Fmy-integrations), select your integration, and enable the needed capabilities under \"Capabilities.\" Common missing capability: \"Read comments\" when querying comments, or \"Insert content\" when creating pages.\n\n---\n\n### 404 — `object_not_found`\n\n```json\n{\"object\": \"error\", \"status\": 404, \"code\": \"object_not_found\", \"message\": \"Could not find page with ID: abc123...\"}\n```\n\n**Cause:** The page, database, or block either does not exist or has not been shared with your integration. This is the single most common Notion API error.\n\n**Fix:**\n\n1. Open the target page in Notion\n2. Click the `...` menu at top right\n3. Select **Connections** and add your integration\n4. Parent pages must also be shared — sharing only a child page is not enough\n\n```typescript\n\u002F\u002F Defensive retrieval pattern\ntry {\n  const page = await notion.pages.retrieve({ page_id: pageId });\n} catch (error) {\n  if (isNotionClientError(error) && error.code === APIErrorCode.ObjectNotFound) {\n    console.error('Page not shared with integration. Add via Connections menu.');\n  }\n}\n```\n\n**Page ID gotcha:** Notion URLs use 32-character hex IDs without dashes (`https:\u002F\u002Fnotion.so\u002FPage-abc123def456...`). The API accepts both dashed (`abc123de-f456-...`) and undashed formats. If you're extracting IDs from URLs, strip the page title prefix and use the last 32 characters.\n\n---\n\n### 400 — `validation_error`\n\n```json\n{\"object\": \"error\", \"status\": 400, \"code\": \"validation_error\", \"message\": \"...\"}\n```\n\n**Message varies.** This is the broadest error category. Common sub-cases:\n\n| Message Pattern | Cause | Fix |\n|----------------|-------|-----|\n| `Title is not a property that exists` | Wrong property name | Use exact name from database schema (case-sensitive) |\n| `... should be an array` | Rich text passed as string | Wrap in `[{ text: { content: \"value\" } }]` |\n| `body.parent.database_id should be defined` | Missing parent in page create | Include `parent: { database_id: \"...\" }` |\n| `... should be a string, instead was ...` | Wrong property type for filter | Match filter type to property type (see below) |\n| `Could not find property with name or id` | Property renamed in Notion UI | Retrieve schema with `databases.retrieve()` to get current names |\n\n**Filter type mismatches** — the most common validation error:\n\n```typescript\n\u002F\u002F WRONG: Status is a status property, not text\n{ property: 'Status', text: { equals: 'Done' } }\n\u002F\u002F RIGHT: Use the matching filter type\n{ property: 'Status', status: { equals: 'Done' } }\n\n\u002F\u002F WRONG: Passing plain string for title\n{ Name: { title: 'My Page' } }\n\u002F\u002F RIGHT: Title requires rich text array\n{ Name: { title: [{ text: { content: 'My Page' } }] } }\n```\n\n**Debug tip:** Always retrieve the database schema first to avoid property name\u002Ftype errors:\n\n```typescript\nconst db = await notion.databases.retrieve({ database_id: dbId });\nconsole.log(Object.entries(db.properties).map(([name, prop]) => `${name}: ${prop.type}`));\n\u002F\u002F Output: \"Name: title\", \"Status: status\", \"Tags: multi_select\", ...\n```\n\n---\n\n### 429 — `rate_limited`\n\n```json\n{\"object\": \"error\", \"status\": 429, \"code\": \"rate_limited\", \"message\": \"Rate limited\"}\n```\n\n**Cause:** Exceeded Notion's average rate limit of 3 requests per second per integration.\n\n**Fix:**\n\n```typescript\nimport { Client, isNotionClientError, APIErrorCode } from '@notionhq\u002Fclient';\n\nasync function withRetry\u003CT>(fn: () => Promise\u003CT>, maxRetries = 3): Promise\u003CT> {\n  for (let attempt = 0; attempt \u003C= maxRetries; attempt++) {\n    try {\n      return await fn();\n    } catch (error) {\n      if (isNotionClientError(error) && error.code === APIErrorCode.RateLimited) {\n        const wait = Math.pow(2, attempt) * 1000; \u002F\u002F exponential backoff\n        console.log(`Rate limited. Waiting ${wait}ms (attempt ${attempt + 1}\u002F${maxRetries})...`);\n        await new Promise(r => setTimeout(r, wait));\n        continue;\n      }\n      throw error;\n    }\n  }\n  throw new Error('Max retries exceeded');\n}\n```\n\nThe `@notionhq\u002Fclient` SDK has built-in retry with exponential backoff. If you hit rate limits frequently, batch operations and add delays between sequential calls. For bulk operations, see `notion-rate-limits`.\n\n---\n\n### 409 — `conflict_error`\n\n```json\n{\"object\": \"error\", \"status\": 409, \"code\": \"conflict_error\", \"message\": \"Transaction has an existing lock on the object.\"}\n```\n\n**Cause:** Concurrent modifications to the same page, block, or database. Common in parallel scripts or multi-user workflows.\n\n**Fix:** Retry the operation. The SDK handles this automatically. If writing your own retry logic, a simple retry after 1-2 seconds resolves most conflicts. Avoid parallelizing writes to the same page.\n\n---\n\n### 500 — `internal_server_error`\n\n```json\n{\"object\": \"error\", \"status\": 500, \"code\": \"internal_server_error\", \"message\": \"Internal Server Error\"}\n```\n\n**Cause:** Bug or transient failure on Notion's servers.\n\n**Fix:** Retry with exponential backoff. If persistent (>5 minutes), check [status.notion.so](https:\u002F\u002Fstatus.notion.so) for ongoing incidents. Consider filing a bug report at [developers.notion.com](https:\u002F\u002Fdevelopers.notion.com) with the request ID from the response headers (`x-request-id`).\n\n---\n\n### 502\u002F503 — `service_unavailable`\n\n```json\n{\"object\": \"error\", \"status\": 503, \"code\": \"service_unavailable\", \"message\": \"Notion is unavailable. Try again later.\"}\n```\n\n**Cause:** Notion's servers are down or under maintenance.\n\n**Fix:**\n\n```bash\n# Check Notion status\ncurl -s https:\u002F\u002Fstatus.notion.so\u002Fapi\u002Fv2\u002Fstatus.json | jq '.status.description'\n```\n\nWait and retry. Monitor [status.notion.so](https:\u002F\u002Fstatus.notion.so) for incident updates.\n\n---\n\n### Step 3: Common Non-HTTP Gotchas\n\n```typescript\n\u002F\u002F \"body failed validation: body.children should be an array\"\n\u002F\u002F → Block children must always be an array, even for a single child.\n\n\u002F\u002F Rich text structure — the #1 source of frustration\n\u002F\u002F WRONG: \"Hello\"\n\u002F\u002F RIGHT: [{ type: \"text\", text: { content: \"Hello\" } }]\n\u002F\u002F Rich text is ALWAYS an array of rich text objects.\n\n\u002F\u002F Block type mismatch when appending children\n\u002F\u002F → Each block type has its own structure. A paragraph block needs:\n\u002F\u002F   { type: \"paragraph\", paragraph: { rich_text: [{ text: { content: \"...\" } }] } }\n\n\u002F\u002F Timeout errors (default 60s)\n\u002F\u002F → Increase via Client constructor:\n\u002F\u002F   new Client({ auth: token, timeoutMs: 120_000 })\n\n\u002F\u002F Pagination: missing results\n\u002F\u002F → Always check has_more and pass start_cursor for next page.\n\u002F\u002F   Notion returns max 100 items per request.\n```\n\n## Output\n\n- Identified error cause from HTTP status and `code` field\n- Applied targeted fix from the matching section\n- Verified resolution with test API call\n\n## Error Handling\n\n| Code | HTTP | Error Name | Retryable | Recommended Action |\n|------|------|------------|-----------|-------------------|\n| `unauthorized` | 401 | Authentication failure | No | Regenerate token at notion.so\u002Fmy-integrations |\n| `restricted_resource` | 403 | Missing capability | No | Enable capability in integration settings |\n| `object_not_found` | 404 | Not shared \u002F not found | No | Share page with integration via Connections menu |\n| `validation_error` | 400 | Malformed request | No | Fix request body — retrieve schema first |\n| `rate_limited` | 429 | Rate limit exceeded | Yes | Respect `Retry-After` header, use exponential backoff |\n| `conflict_error` | 409 | Concurrent modification | Yes | Retry after 1-2s, serialize writes to same object |\n| `internal_server_error` | 500 | Notion server error | Yes | Retry with backoff, check status.notion.so |\n| `service_unavailable` | 502\u002F503 | Notion down | Yes | Wait and retry, check status.notion.so |\n| `gateway_timeout` | 504 | Request timeout | Yes | Retry, reduce query complexity or page size |\n\n## Examples\n\n### Full SDK Error Handler\n\n```typescript\nimport { Client, isNotionClientError, APIErrorCode, ClientErrorCode } from '@notionhq\u002Fclient';\n\nconst notion = new Client({ auth: process.env.NOTION_TOKEN });\n\ntry {\n  const page = await notion.pages.retrieve({ page_id: pageId });\n} catch (error) {\n  if (isNotionClientError(error)) {\n    switch (error.code) {\n      case APIErrorCode.ObjectNotFound:\n        console.error('Page not found or not shared with integration');\n        break;\n      case APIErrorCode.Unauthorized:\n        console.error('Invalid API token');\n        break;\n      case APIErrorCode.RestrictedResource:\n        console.error('Integration lacks required capability');\n        break;\n      case APIErrorCode.RateLimited:\n        console.error('Rate limited — retry with backoff');\n        break;\n      case APIErrorCode.ValidationError:\n        console.error(`Validation error: ${error.message}`);\n        break;\n      case ClientErrorCode.RequestTimeout:\n        console.error('Request timed out');\n        break;\n      default:\n        console.error(`Notion error: ${error.code} — ${error.message}`);\n    }\n  } else {\n    throw error; \u002F\u002F Non-Notion error\n  }\n}\n```\n\n### Quick Diagnostic Script\n\n```bash\n# 1. Check Notion status\ncurl -s https:\u002F\u002Fstatus.notion.so\u002Fapi\u002Fv2\u002Fstatus.json | jq '.status.description'\n\n# 2. Verify token\ncurl -s https:\u002F\u002Fapi.notion.com\u002Fv1\u002Fusers\u002Fme \\\n  -H \"Authorization: Bearer ${NOTION_TOKEN}\" \\\n  -H \"Notion-Version: 2022-06-28\" | jq '{id, type, name}'\n\n# 3. Test database access (replace DB_ID)\ncurl -s \"https:\u002F\u002Fapi.notion.com\u002Fv1\u002Fdatabases\u002F${DB_ID}\" \\\n  -H \"Authorization: Bearer ${NOTION_TOKEN}\" \\\n  -H \"Notion-Version: 2022-06-28\" | jq '{id, title: .title[0].plain_text}'\n```\n\n## Resources\n\n- [Notion API Error Codes](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Ferrors)\n- [Request Limits & Rate Limiting](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Frequest-limits)\n- [Notion Status Page](https:\u002F\u002Fstatus.notion.so)\n- [API Introduction](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fintro)\n- [Working with Databases](https:\u002F\u002Fdevelopers.notion.com\u002Fdocs\u002Fworking-with-databases)\n- [@notionhq\u002Fclient npm](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@notionhq\u002Fclient)\n\n## Next Steps\n\nFor comprehensive debugging workflows, see `notion-debug-bundle`. For rate limit strategies at scale, see `notion-rate-limits`.\n","# Notion Common Errors\n\n## Overview\n\nQuick reference for all Notion API error codes with exact HTTP statuses, error bodies, and fixes. The API returns errors as JSON with three fields:\n\n```json\n{\n  \"object\": \"error\",\n  \"status\": 400,\n  \"code\": \"validation_error\",\n  \"message\": \"Title is not a property that exists.\"\n}\n```\n\nAll requests require `Authorization: Bearer \u003Ctoken>` and `Notion-Version: 2022-06-28` headers.\n\n## Prerequisites\n\n- `@notionhq\u002Fclient` installed (`npm install @notionhq\u002Fclient`)\n- `NOTION_TOKEN` environment variable set (internal integration token starting with `ntn_` or `secret_`)\n- Target pages\u002Fdatabases shared with the integration via the Connections menu\n\n## Instructions\n\n### Step 1: Identify the Error\n\nRun the diagnostic script below or check your application logs. Match the HTTP status and `code` field to the sections that follow.\n\n### Step 2: Match Error Code and Apply Fix\n\n---\n\n### 401 — `unauthorized`\n\n```json\n{\"object\": \"error\", \"status\": 401, \"code\": \"unauthorized\", \"message\": \"API token is invalid.\"}\n```\n\n**Cause:** Token is missing, malformed, expired, or revoked.\n\n**Fix:**\n\n```bash\n# Verify token is set\necho ${NOTION_TOKEN:+SET}\n\n# Test directly\ncurl -s https:\u002F\u002Fapi.notion.com\u002Fv1\u002Fusers\u002Fme \\\n  -H \"Authorization: Bearer ${NOTION_TOKEN}\" \\\n  -H \"Notion-Version: 2022-06-28\" | jq .\n```\n\nIf the response shows your integration bot user, the token is valid. Otherwise regenerate at [notion.so\u002Fmy-integrations](https:\u002F\u002Fwww.notion.so\u002Fmy-integrations). Tokens starting with `secret_` are legacy format — new integrations use `ntn_` prefix.\n\n---\n\n### 403 — `restricted_resource`\n\n```json\n{\"object\": \"error\", \"status\": 403, \"code\": \"restricted_resource\", \"message\": \"Insufficient permissions for this resource.\"}\n```\n\n**Cause:** The integration exists and the page is shared, but the integration lacks the required capability (read content, update content, insert content, read comments).\n\n**Fix:** Go to [notion.so\u002Fmy-integrations](https:\u002F\u002Fwww.notion.so\u002Fmy-integrations), select your integration, and enable the needed capabilities under \"Capabilities.\" Common missing capability: \"Read comments\" when querying comments, or \"Insert content\" when creating pages.\n\n---\n\n### 404 — `object_not_found`\n\n```json\n{\"object\": \"error\", \"status\": 404, \"code\": \"object_not_found\", \"message\": \"Could not find page with ID: abc123...\"}\n```\n\n**Cause:** The page, database, or block either does not exist or has not been shared with your integration. This is the single most common Notion API error.\n\n**Fix:**\n\n1. Open the target page in Notion\n2. Click the `...` menu at top right\n3. Select **Connections** and add your integration\n4. Parent pages must also be shared — sharing only a child page is not enough\n\n```typescript\n\u002F\u002F Defensive retrieval pattern\ntry {\n  const page = await notion.pages.retrieve({ page_id: pageId });\n} catch (error) {\n  if (isNotionClientError(error) && error.code === APIErrorCode.ObjectNotFound) {\n    console.error('Page not shared with integration. Add via Connections menu.');\n  }\n}\n```\n\n**Page ID gotcha:** Notion URLs use 32-character hex IDs without dashes (`https:\u002F\u002Fnotion.so\u002FPage-abc123def456...`). The API accepts both dashed (`abc123de-f456-...`) and undashed formats. If you're extracting IDs from URLs, strip the page title prefix and use the last 32 characters.\n\n---\n\n### 400 — `validation_error`\n\n```json\n{\"object\": \"error\", \"status\": 400, \"code\": \"validation_error\", \"message\": \"...\"}\n```\n\n**Message varies.** This is the broadest error category. Common sub-cases:\n\n| Message Pattern | Cause | Fix |\n|----------------|-------|-----|\n| `Title is not a property that exists` | Wrong property name | Use exact name from database schema (case-sensitive) |\n| `... should be an array` | Rich text passed as string | Wrap in `[{ text: { content: \"value\" } }]` |\n| `body.parent.database_id should be defined` | Missing parent in page create | Include `parent: { database_id: \"...\" }` |\n| `... should be a string, instead was ...` | Wrong property type for filter | Match filter type to property type (see below) |\n| `Could not find property with name or id` | Property renamed in Notion UI | Retrieve schema with `databases.retrieve()` to get current names |\n\n**Filter type mismatches** — the most common validation error:\n\n```typescript\n\u002F\u002F WRONG: Status is a status property, not text\n{ property: 'Status', text: { equals: 'Done' } }\n\u002F\u002F RIGHT: Use the matching filter type\n{ property: 'Status', status: { equals: 'Done' } }\n\n\u002F\u002F WRONG: Passing plain string for title\n{ Name: { title: 'My Page' } }\n\u002F\u002F RIGHT: Title requires rich text array\n{ Name: { title: [{ text: { content: 'My Page' } }] } }\n```\n\n**Debug tip:** Always retrieve the database schema first to avoid property name\u002Ftype errors:\n\n```typescript\nconst db = await notion.databases.retrieve({ database_id: dbId });\nconsole.log(Object.entries(db.properties).map(([name, prop]) => `${name}: ${prop.type}`));\n\u002F\u002F Output: \"Name: title\", \"Status: status\", \"Tags: multi_select\", ...\n```\n\n---\n\n### 429 — `rate_limited`\n\n```json\n{\"object\": \"error\", \"status\": 429, \"code\": \"rate_limited\", \"message\": \"Rate limited\"}\n```\n\n**Cause:** Exceeded Notion's average rate limit of 3 requests per second per integration.\n\n**Fix:**\n\n```typescript\nimport { Client, isNotionClientError, APIErrorCode } from '@notionhq\u002Fclient';\n\nasync function withRetry\u003CT>(fn: () => Promise\u003CT>, maxRetries = 3): Promise\u003CT> {\n  for (let attempt = 0; attempt \u003C= maxRetries; attempt++) {\n    try {\n      return await fn();\n    } catch (error) {\n      if (isNotionClientError(error) && error.code === APIErrorCode.RateLimited) {\n        const wait = Math.pow(2, attempt) * 1000; \u002F\u002F exponential backoff\n        console.log(`Rate limited. Waiting ${wait}ms (attempt ${attempt + 1}\u002F${maxRetries})...`);\n        await new Promise(r => setTimeout(r, wait));\n        continue;\n      }\n      throw error;\n    }\n  }\n  throw new Error('Max retries exceeded');\n}\n```\n\nThe `@notionhq\u002Fclient` SDK has built-in retry with exponential backoff. If you hit rate limits frequently, batch operations and add delays between sequential calls. For bulk operations, see `notion-rate-limits`.\n\n---\n\n### 409 — `conflict_error`\n\n```json\n{\"object\": \"error\", \"status\": 409, \"code\": \"conflict_error\", \"message\": \"Transaction has an existing lock on the object.\"}\n```\n\n**Cause:** Concurrent modifications to the same page, block, or database. Common in parallel scripts or multi-user workflows.\n\n**Fix:** Retry the operation. The SDK handles this automatically. If writing your own retry logic, a simple retry after 1-2 seconds resolves most conflicts. Avoid parallelizing writes to the same page.\n\n---\n\n### 500 — `internal_server_error`\n\n```json\n{\"object\": \"error\", \"status\": 500, \"code\": \"internal_server_error\", \"message\": \"Internal Server Error\"}\n```\n\n**Cause:** Bug or transient failure on Notion's servers.\n\n**Fix:** Retry with exponential backoff. If persistent (>5 minutes), check [status.notion.so](https:\u002F\u002Fstatus.notion.so) for ongoing incidents. Consider filing a bug report at [developers.notion.com](https:\u002F\u002Fdevelopers.notion.com) with the request ID from the response headers (`x-request-id`).\n\n---\n\n### 502\u002F503 — `service_unavailable`\n\n```json\n{\"object\": \"error\", \"status\": 503, \"code\": \"service_unavailable\", \"message\": \"Notion is unavailable. Try again later.\"}\n```\n\n**Cause:** Notion's servers are down or under maintenance.\n\n**Fix:**\n\n```bash\n# Check Notion status\ncurl -s https:\u002F\u002Fstatus.notion.so\u002Fapi\u002Fv2\u002Fstatus.json | jq '.status.description'\n```\n\nWait and retry. Monitor [status.notion.so](https:\u002F\u002Fstatus.notion.so) for incident updates.\n\n---\n\n### Step 3: Common Non-HTTP Gotchas\n\n```typescript\n\u002F\u002F \"body failed validation: body.children should be an array\"\n\u002F\u002F → Block children must always be an array, even for a single child.\n\n\u002F\u002F Rich text structure — the #1 source of frustration\n\u002F\u002F WRONG: \"Hello\"\n\u002F\u002F RIGHT: [{ type: \"text\", text: { content: \"Hello\" } }]\n\u002F\u002F Rich text is ALWAYS an array of rich text objects.\n\n\u002F\u002F Block type mismatch when appending children\n\u002F\u002F → Each block type has its own structure. A paragraph block needs:\n\u002F\u002F   { type: \"paragraph\", paragraph: { rich_text: [{ text: { content: \"...\" } }] } }\n\n\u002F\u002F Timeout errors (default 60s)\n\u002F\u002F → Increase via Client constructor:\n\u002F\u002F   new Client({ auth: token, timeoutMs: 120_000 })\n\n\u002F\u002F Pagination: missing results\n\u002F\u002F → Always check has_more and pass start_cursor for next page.\n\u002F\u002F   Notion returns max 100 items per request.\n```\n\n## Output\n\n- Identified error cause from HTTP status and `code` field\n- Applied targeted fix from the matching section\n- Verified resolution with test API call\n\n## Error Handling\n\n| Code | HTTP | Error Name | Retryable | Recommended Action |\n|------|------|------------|-----------|-------------------|\n| `unauthorized` | 401 | Authentication failure | No | Regenerate token at notion.so\u002Fmy-integrations |\n| `restricted_resource` | 403 | Missing capability | No | Enable capability in integration settings |\n| `object_not_found` | 404 | Not shared \u002F not found | No | Share page with integration via Connections menu |\n| `validation_error` | 400 | Malformed request | No | Fix request body — retrieve schema first |\n| `rate_limited` | 429 | Rate limit exceeded | Yes | Respect `Retry-After` header, use exponential backoff |\n| `conflict_error` | 409 | Concurrent modification | Yes | Retry after 1-2s, serialize writes to same object |\n| `internal_server_error` | 500 | Notion server error | Yes | Retry with backoff, check status.notion.so |\n| `service_unavailable` | 502\u002F503 | Notion down | Yes | Wait and retry, check status.notion.so |\n| `gateway_timeout` | 504 | Request timeout | Yes | Retry, reduce query complexity or page size |\n\n## Examples\n\n### Full SDK Error Handler\n\n```typescript\nimport { Client, isNotionClientError, APIErrorCode, ClientErrorCode } from '@notionhq\u002Fclient';\n\nconst notion = new Client({ auth: process.env.NOTION_TOKEN });\n\ntry {\n  const page = await notion.pages.retrieve({ page_id: pageId });\n} catch (error) {\n  if (isNotionClientError(error)) {\n    switch (error.code) {\n      case APIErrorCode.ObjectNotFound:\n        console.error('Page not found or not shared with integration');\n        break;\n      case APIErrorCode.Unauthorized:\n        console.error('Invalid API token');\n        break;\n      case APIErrorCode.RestrictedResource:\n        console.error('Integration lacks required capability');\n        break;\n      case APIErrorCode.RateLimited:\n        console.error('Rate limited — retry with backoff');\n        break;\n      case APIErrorCode.ValidationError:\n        console.error(`Validation error: ${error.message}`);\n        break;\n      case ClientErrorCode.RequestTimeout:\n        console.error('Request timed out');\n        break;\n      default:\n        console.error(`Notion error: ${error.code} — ${error.message}`);\n    }\n  } else {\n    throw error; \u002F\u002F Non-Notion error\n  }\n}\n```\n\n### Quick Diagnostic Script\n\n```bash\n# 1. Check Notion status\ncurl -s https:\u002F\u002Fstatus.notion.so\u002Fapi\u002Fv2\u002Fstatus.json | jq '.status.description'\n\n# 2. Verify token\ncurl -s https:\u002F\u002Fapi.notion.com\u002Fv1\u002Fusers\u002Fme \\\n  -H \"Authorization: Bearer ${NOTION_TOKEN}\" \\\n  -H \"Notion-Version: 2022-06-28\" | jq '{id, type, name}'\n\n# 3. Test database access (replace DB_ID)\ncurl -s \"https:\u002F\u002Fapi.notion.com\u002Fv1\u002Fdatabases\u002F${DB_ID}\" \\\n  -H \"Authorization: Bearer ${NOTION_TOKEN}\" \\\n  -H \"Notion-Version: 2022-06-28\" | jq '{id, title: .title[0].plain_text}'\n```\n\n## Resources\n\n- [Notion API Error Codes](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Ferrors)\n- [Request Limits & Rate Limiting](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Frequest-limits)\n- [Notion Status Page](https:\u002F\u002Fstatus.notion.so)\n- [API Introduction](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fintro)\n- [Working with Databases](https:\u002F\u002Fdevelopers.notion.com\u002Fdocs\u002Fworking-with-databases)\n- [@notionhq\u002Fclient npm](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@notionhq\u002Fclient)\n\n## Next Steps\n\nFor comprehensive debugging workflows, see `notion-debug-bundle`. For rate limit strategies at scale, see `notion-rate-limits`.\n",{"name":5,"tags":24,"author":28,"license":15,"version":29,"description":30,"allowed-tools":31,"compatible-with":32},[25,26,27],"saas","productivity","notion","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Diagnose and fix Notion API errors by HTTP status code and error code.\nUse when encountering Notion errors, debugging failed requests,\nor troubleshooting integration access, rate limiting, or validation issues.\nTrigger with phrases like \"notion error\", \"fix notion\",\n\"notion not working\", \"debug notion\", \"notion 400\", \"notion 429\".\n","Read, Grep, Bash(curl:*)","claude-code","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fsaas-packs--notion-pack--notion-common-errors",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill notion-common-errors",{"tool":48,"command":49},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill notion-common-errors",{"tool":51,"command":52},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill notion-common-errors","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--notion-pack--notion-common-errors\u002FSKILL.md",true,[],[57,64,71,78,85,93],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":89,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]