Notion trigger node - errors

Describe the problem/error/question

I have a workflow with a Notion Trigger and Event being a “Page added to data base”. It works fine when I intentionally trigger but after adding an Error workflow is seems to randomly produce two errors.

I don’t particularly care that there is an error, but its clogging up my slack where errors are reported, so was hoping I could do something to fix before I removed the error workflow.

Many thanks!

What is the error message (if any)?

{“message”:“Bad gateway - the service failed to handle your request”,“timestamp”:1686610611102,“name”:“NodeApiError”,“description”:“\r\n502 Bad Gateway\r\n\r\n

502 Bad Gateway

\r\n\r\n\r\n”,“context”:{},“cause”:{“message”:“502 - "\r\n502 Bad Gateway\r\n\r\n

502 Bad Gateway

\r\n\r\n\r\n"”,“name”:“Error”,“stack”:“Error: 502 - "\r\n502 Bad Gateway\r\n\r\n

502 Bad Gateway

\r\n\r\n\r\n"\n at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (node:events:525:35)\n at IncomingMessage.emit (node:domain:489:12)\n at endReadableNT (node:internal/streams/readable:1358:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)”}}

and

{“message”:“The service was not able to process your request”,“timestamp”:1686629506146,“name”:“NodeApiError”,“description”:“PostgresConnectionError: pg.pool can’t connect to Postgres due to: Connection terminated due to connection timeout, please retry later”,“context”:{},“cause”:{“message”:“500 - {"object":"error","status":500,"code":"internal_server_error","message":"PostgresConnectionError: pg.pool can’t connect to Postgres due to: Connection terminated due to connection timeout, please retry later"}”,“name”:“Error”,“stack”:“Error: 500 - {"object":"error","status":500,"code":"internal_server_error","message":"PostgresConnectionError: pg.pool can’t connect to Postgres due to: Connection terminated due to connection timeout, please retry later"}\n at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (node:events:525:35)\n at IncomingMessage.emit (node:domain:489:12)\n at endReadableNT (node:internal/streams/readable:1358:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)”}}

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 0.228.2
  • Database (default: SQLite): Unsure - cloud hosted
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Unsure - cloud hosted
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Cloud
  • Operating system: N/A

I thought it would be useful to share the timing and frequency of errors.

Hi @got_flat, the 5xx error codes including the 502 you were seeing suggest a problem on the remote end (Notion in this case).

Such problems will unfortunately bubble up from time to time as Notion doesn’t have a 100% uptime. This isn’t just limited to their API, brief downtimes also occur when I use Notion as usual throughout the week (where I typically need to reload the page for Notion to work as expected).

You could consider using the retry option offered by n8n here. Seeing these issues don’t usually last very long, you could consider using n8n’s retry option to reduce their frequency:

1 Like

Thanks MutedJam, I will give it ago.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.