Hey all,
I’m a relatively new n8n user - we’re having a bit of play with n8n hosted internally here.
I’m having some issues with not being able to get my error workflow to trigger. Its a simple error workflow that just writes a message to a Microsoft Teams channel, and it works when I manually execute it with the test data.
However, when I set it as the error workflow for another workflow that errors out, nothing seems to be triggered.
My main workflow is published and active, and I have set the error workflow in the settings of the main workflow.
I feel like I’m missing something obvious but not sure what it is.
The only version that caused problems is 0.118.0. So all before and after should work fine. So would still recommend to upgrade but it will likely not fix your issue.
Hi Jan,
Thanks for your help thus far. Upgrading didn’t resolve the issue and I’ve reviewed the blog post, we are doing pretty much the same thing.
I have a workflow called errorWorkflow that contains an Error Trigger and a Microsoft Teams node. This workflow is not active (because it cannot be activated). When I test this workflow, the teams message gets sent correctly.
I have a second workflow that has the errorWorkflow specified in its’ settings and this workflow is active.
This second workflow contains some custom nodes that we’ve written.
In some scenarios, these custom nodes are causing errors (in this case, unexpected end of JSON input), and I was expecting the errorWorkflow to trigger. The failed workflow appears as failed in the executions list, but no Teams message is written and I cannot find (or do not know where to look) any reference to the errorWorkflow being triggered.
I’m on 0.120.0 and I’m experiencing the same issue.
Upon debugging, I was able to trigger the error workflow by having the erroring workflow run on webhook or cron, but not by manually executing it.
It would appear that error triggers are only called on automated runs, not on manual ones. Am I mistaken? Is this intended behavior/is it customizable?
@IbnJubayr are you executing the workflow manually too?
The Error Trigger node is designed to get triggered when the workflows execute automatically. One of the important reason for this is that you don’t see the output in the Editor UI when you’re workflows are active. The Error Trigger node sends you an alert when something is wrong in that active workflow.
But when you’re running your workflows manually, you get the output in the Editor UI. You get the error, if there’s any.
Can you create a different workflow that do not use your custom nodes and set up the Error Workflow? This can be a simple Cron node with a Function node (with incorrect code). This will help us understand if something is still wrong with the Error Trigger node or if it’s your custom node
Hi,
Thanks for that suggestion. I’ve just tried this (cron trigger every minute with a function node that errors on runtime). I’ve activated it and associated it to the same error workflow that just writes a message to a teams channel. I’ve left it running and it has errored out a few times but the error workflow does not seem to trigger.
Is there anything I can check on this end regarding log files to see what is happening?