Understanding error capture

Hi. We are trying to understand the error capturing options in n8n.

I’ve reads tutorials and some entries here. We already have a capture error workflow in the settings of most workflows, and we also understand that I can “continue on error” on a specific node, but we would like to make decisions on the workflow based on a possible error.

So for example, only if a rocket.chat notification fails, send an email. If we do “continue on error” both would always be sent so I am trying to archive it via evaluating the “Success” field of previous node as in so:

It would be great to confirm if this is correct and could apply to “any node”.

ERROR CAPTURE
Additionally, I am also trying to understand how the error trigger works. If a node has workflow to report errors to and I add an error trigger in the workflow itself what happens?
Both get executed, or only the “local one”?
Do “continue on errors” trigger the error trigger in any case?
Can I avoid somehow a node triggering it intentionally?

Finally, any way of making a certain error workflow be the default when creating new ones?

Thanks.

Hi @luison, your approach looks good to me.

It would be great to confirm if this is correct and could apply to “any node”.

An error thrown by n8n would not produce a success field with a value of true, so your condition should work as long as the previous node would return this field in a success case.

Additionally, I am also trying to understand how the error trigger works. If a node has workflow to report errors to and I add an error trigger in the workflow itself what happens? Both get executed, or only the “local one”?

The workflow would trigger itself, as long as your workflow is set to call itself as the error workflow (assuming it has an error trigger in addition to your regular trigger). The error workflow can be configured in the workflow settings:

Only the workflow configured here would be called, so you cannot have your workflow call itself and a separate error workflow.

Do “continue on errors” trigger the error trigger in any case?

No, errors are ignored when the Continue On Fail option is active.

Can I avoid somehow a node triggering it intentionally?

No, if you have configured an error workflow and are not using the Continue On Fail, the error workflow would start whenever you encounter an error.

Finally, any way of making a certain error workflow be the default when creating new ones?

Not that I am aware of, but this would make a good feature request I think.

1 Like

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