I need help with a Notion API problem that’s driving me crazy!
I’m working on a Node.js application that connects to Notion’s API for adding entries to a database. Everything was running smoothly until yesterday when I started getting this weird error.
The issue happened after I tried to add functionality to save data when users navigate away from the page. Even though I reverted all my changes using git stash and went back to the previously working code, the error persists.
Here’s the error response I keep getting:
response: {
object: 'error',
status: 400,
code: 'validation_error',
message: 'Unsaved transactions: Unrecognized error.'
}
I’ve tried rebuilding the entire project and restarting my development server multiple times, but nothing seems to fix it. The same code that was working perfectly before now throws this validation error every time I try to create a new database entry.
Has anyone encountered this type of Notion API error before? What could cause “unsaved transactions” to suddenly appear when the code hasn’t changed?
i totally get ya, those errors can be a pain! maybe try checking your API token to make sure it’s still good. also, clearing cache sometimes helps with those weird glitches. hope this helps, good luck!
This usually happens when you’re hitting the Notion API with multiple requests at once. Even though you rolled back your code, the problem might be how your app handles database transactions. I had the same issue when I built an auto-save feature that kept firing API calls before the previous ones finished. Check for any event listeners or timers still running in the background - they might be triggering extra API calls. Also double-check your database permissions since Notion sometimes changes workspace settings that mess with API access. Try adding a small delay between calls or set up a request queue so they don’t overlap.
This error blindsided me about six months ago. The annoying thing is ‘unsaved transactions’ doesn’t mean what you’d think. For me, it was malformed property values in the database payload. My code looked exactly the same as before, but I found one of my date fields was passing an empty string instead of null when no date was selected. Notion’s API got stricter about data validation without telling anyone. Log your entire request payload before sending it and compare it character by character with a working example. Also check if any database properties changed recently in the Notion interface - schema changes can break previously valid requests.