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

FetchError : invalid json response body. #31

Open
dearlsh94 opened this issue Sep 26, 2023 · 2 comments
Open

FetchError : invalid json response body. #31

dearlsh94 opened this issue Sep 26, 2023 · 2 comments

Comments

@dearlsh94
Copy link

while running the getBlocks function, I'm getting the following error.
FetchError : invalid json response body. reason: 'Unexpected toekn < in JSON at position 0'

The token and databseId are fine.
When I called the API with Postman, I got a success response.

And get those errors intermittently in the some block.
If this error occurs even once, the build will fail.

(gatsby-source-notion-api
Could not fetch data from Notion API. Check if "databaseId" and "token" are provided correctly. Make sure the integration using provided token has access to provided database.)

This issue started happening out of the blue a few days ago.

"gatsby": "^5.7.0",
"gatsby-source-notion-api": "^0.12.0",
@orlowdev
Copy link
Owner

Hi, can you please check if this block is available under given token?

@dearlsh94
Copy link
Author

Yes, the token is available. Calling it with postman will return success response.
And after several attempts the block where the error occurs keeps changing

So, I guess intermittently not getting a success response from the notion to block requests.
I'm not beleved to be an error in this library. However, i having issue, so created this ticket

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

2 participants