Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find database with ID #6

Open
jsjoeio opened this issue Mar 6, 2023 · 4 comments
Open

Could not find database with ID #6

jsjoeio opened this issue Mar 6, 2023 · 4 comments

Comments

@jsjoeio
Copy link

jsjoeio commented Mar 6, 2023

I cannot get the @notionhq/client that you use to grab the data to work.

I've followed the instructions and have added the database ID, setup the connection and added some posts to the page.

database: https://www.notion.so/jsjoeio/Blog-6c79d10bf60241df8cfaf23742d30a2a?pvs=4

error:

@notionhq/client warn: request fail {
  code: 'object_not_found',
  message: 'Could not find database with ID: 6c79d10b-f602-41df-8cfa-f23742d30a2a. Make sure the relevant pages and databases are shared with your integration.'
}
@notionhq/client debug: failed response body {
  body: '{"object":"error","status":404,"code":"object_not_found","message":"Could not find database with ID: 6c79d10b-f602-41df-8cfa-f23742d30a2a. Make sure the relevant pages and databases are shared with your integration."}'
}
APIResponseError: Could not find database with ID: 6c79d10b-f602-41df-8cfa-f23742d30a2a. Make sure the relevant pages and databases are shared with your integration.
    at buildRequestError (/home/coder/speak-argentinian-spanish/node_modules/@notionhq/client/build/src/errors.js:162:16)
    at Client.request (/home/coder/speak-argentinian-spanish/node_modules/@notionhq/client/build/src/Client.js:304:54)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Module.getTableData (/node_modules/@jcha0713/astro-notion/api/getTableData.ts:36:22)
    at async eval (/home/coder/speak-argentinian-spanish/src/pages/blog.astro:14:16)
    at async renderPage (file:///home/coder/speak-argentinian-spanish/node_modules/astro/dist/runtime/server/render/page.js:91:30)
    at async renderPage (file:///home/coder/speak-argentinian-spanish/node_modules/astro/dist/core/render/core.js:81:20)
    at async renderPage (file:///home/coder/speak-argentinian-spanish/node_modules/astro/dist/core/render/dev/index.js:108:10)
    at async handleRoute (file:///home/coder/speak-argentinian-spanish/node_modules/astro/dist/vite-plugin-astro-server/route.js:152:20)
    at async run (file:///home/coder/speak-argentinian-spanish/node_modules/astro/dist/vite-plugin-astro-server/request.js:46:14)
    at async runWithErrorHandling (file:///home/coder/speak-argentinian-spanish/node_modules/astro/dist/vite-plugin-astro-server/controller.js:65:5)
    at async handleRequest (file:///home/coder/speak-argentinian-spanish/node_modules/astro/dist/vite-plugin-astro-server/request.js:40:3) {
  code: 'object_not_found',
  status: 404,
  headers: Headers {
    [Symbol(map)]: [Object: null prototype] {
      date: [Array],
      'content-type': [Array],
      'transfer-encoding': [Array],
      connection: [Array],
      'set-cookie': [Array],
      'content-security-policy': [Array],
      'x-dns-prefetch-control': [Array],
      'x-frame-options': [Array],
      'strict-transport-security': [Array],
      'x-download-options': [Array],
      'x-content-type-options': [Array],
      'x-permitted-cross-domain-policies': [Array],
      'referrer-policy': [Array],
      'x-xss-protection': [Array],
      etag: [Array],
      vary: [Array],
      'cf-cache-status': [Array],
      server: [Array],
      'cf-ray': [Array],
      'content-encoding': [Array]
    }
  },
  body: '{"object":"error","status":404,"code":"object_not_found","message":"Could not find database with ID: 6c79d10b-f602-41df-8cfa-f23742d30a2a. Make sure the relevant pages and databases are shared with your integration."}'
}

any tips for troubleshooting this?

@jcha0713
Copy link
Owner

jcha0713 commented Mar 9, 2023

Hey, sorry for the delay. I have noticed this issue and I am currently investigating it.

@jsjoeio
Copy link
Author

jsjoeio commented Mar 9, 2023

Thank you!

@chilir
Copy link

chilir commented Apr 9, 2023

In your post, you're linking to the page hosting the database inline, not the database itself. Click on the 3 dots beside the database title and then go to Share -> Copy link

image

In your case, the correct database ID should be 40e92ad1095a48b8a32b6ae7b24429ff

@jsjoeio
Copy link
Author

jsjoeio commented Apr 11, 2023

@chilir ohhhh! thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants