splitbee / notion-api-worker

Notion as CMS with easy API access
MIT License
1.56k stars 197 forks source link

[notion-api.splitbee.io] Worker threw exception when fetching tables #59

Closed danielfalbo closed 3 years ago

danielfalbo commented 3 years ago

This example from the readme is not working. When doing the request, I get "Error 1101 - Worker threw exception" from Cloudflare. Using Next.js, running npm run dev throws a FetchError for invalid json response body (Unexpected token < in JSON at position 0).

Is it me? Can you recreate?

yehezkielgunawan commented 3 years ago

You're not alone. I faced the same problem when running in dev. This is the error message.

FetchError: invalid json response body at https://notion-api.splitbee.io/v1//table/${myID} reason: Unexpected token < in JSON at position 0

I even have tried to re-install the dependencies by deleting the package-lock.json and node_modules then re-install it again by npm install. But nothing changes. Is it caused by the request limit or it's because the queryCollection API changes from Notion?

pbteja1998 commented 3 years ago

Opened a PR that resolves this issue. Looks like Notion changed their queryCollection API.