gatsby-source-notion-api icon indicating copy to clipboard operation
gatsby-source-notion-api copied to clipboard

FetchError : invalid json response body.

Open dearlsh94 opened this issue 1 year ago • 2 comments

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",

dearlsh94 avatar Sep 26 '23 08:09 dearlsh94

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

orlowdev avatar Sep 29 '23 12:09 orlowdev

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

dearlsh94 avatar Oct 02 '23 04:10 dearlsh94