notion-sdk-js: I get a 502 error when updating a page property on database with a large number of pages (3000 over)
Report bugs here only for the Node JavaScript library.
If you’re having problems using Notion’s API, or have any other feedback about the API including feature requests for the JavaScript library, please email support at developers@notion.com.
Describe the bug We are currently moving a lot of imported data into the database and attaching properties etc. The update process itself is done synchronously, and works fine until the middle of the process, but when it reaches a certain number, I get a 502 error. Is there any workaround for this? my code is here
To Reproduce Node version: v16.4.0 Notion JS library version: ^0.2.3
Steps to reproduce the behavior: update page props on database includes over 3000 pages.
Expected behavior The update must be successful.
Screenshots The error code is as follows
@notionhq/client warn: request fail {
code: 'notionhq_client_response_error',
message: 'Request to Notion API failed with status: 502'
}
Additional context The specific code is below
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 11
- Comments: 42 (1 by maintainers)
502s… 502s everywhere!
Getting a lot of 502 in the past few days on querying a DB (not creating pages, and small DB):
Here’s an extract of the response:
I’ll try the exponential backoff route but it’s indeed disappointing to see this not being addressed
About 5 days ago we started getting 502 errors. I guess it’s related to Notion’s API, but really not sure. If there’re tips for getting more verbose output I’d love to provide more context!
I’m getting similar behavior on batch deletes. I thought maybe I was getting rate limited (even though that should be a 429) but that doesn’t seem to be the case. This has pretty severely hurt my workflow.
It’s baffling how the Notion Status page shows all systems are working normally - based on the number of contributors in this thread, that’s clearly not the case.
I’ve worked around this for now by just retrying failed requests (they generally work on the 2nd attempt and I haven’t seen any fail after 3 attempts) but I’m focusing my attention on moving off the platform rather than spending more time troubleshooting.
Same here, in the past week, we had a lot of 500 and 502. All of them when trying to update a database item property.
Same issue. This has been going on for months in some capacity but even significantly reducing queries and adding large sleep timeouts doesn’t work. The notion API really isn’t production ready when issues like this are widespread.
Should add this occurs even when just reading content nevermind actively updating content
Getting this error on page retrieval as well. Any news on this?
experiencing the same issue on even a smaller number (300 pages)
faced the same issue even though I wasn’t updating in bulk.