Postgres error handling

Describe the problem/error/question

I am trying to implement error handling in my flow. I took the database offline and in the postgres node I get an error:

getaddrinfo ENOTFOUND some-postgres

Great as expected.

My on Error options is set to “Continue (using error output)”:

Therefore the postgres node has two outputs, success and error. In this case I would expect it to go to the error side of the flow. But it always go to the success part of it as the image shows.

Questions

1) Am i doing anything wrong? is this a bug?

2) I want to answer to webhook based on the database answer. Is there a better a approach?

Information on your n8n setup

  • n8n version: 1.88.0
  • Database (default: SQLite): postgress 17.5
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Windows