Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need Generic Catch Error Mechanism within Main Workflows #8897

Closed
dkindlund opened this issue Mar 15, 2024 · 5 comments
Closed

Need Generic Catch Error Mechanism within Main Workflows #8897

dkindlund opened this issue Mar 15, 2024 · 5 comments

Comments

@dkindlund
Copy link

Bug Description

For any node in any workflow, we need a generic mechanism to catch and handle errors within the workflow -- rather than wiring up a separate "error workflow" for these cases.

Specifically, separate error workflows are great when you want to have a generic notification mechanism for alerting on any/all workflow errors (like Send Alert to Slack).

But, separate error workflows are bad when you want to catch specific errors and handle them in a unique way. Why? Because how you handle these errors likely depends on which node in your workflow threw the error. And if that handling logic is divorced from the originating workflow, then now, as a developer, you have to constantly flip between the "main" workflow and the "error" workflow in order to handle/manage unique errors on a node-by-node basis.

From a quality-of-life perspective, it's much easier to handle node-specific errors when you are editing the main workflow and not as a separate activity later in the development cycle.

Make.com's error handling has the following different types of "error handling" nodes:

  • Ignore
  • Resume
  • Commit
  • Rollback
  • Break

It would be very useful if n8n had any sort of equivalent capabilities within the main workflow (not as a separate error workflow).

To Reproduce

...

Expected behavior

...

Operating System

Google Cloud Run

n8n Version

1.30.2

Node.js Version

18.10

Database

PostgreSQL

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented Mar 15, 2024

Hey @dkindlund,

I like the idea but we use GitHub to track bugs not feature requests, would you be able to create this on the support forum which will allow the community to comment and vote on the request.

For now as there is no bug here I am going to mark this as closed.

@Joffcom Joffcom closed this as not planned Won't fix, can't repro, duplicate, stale Mar 15, 2024
@janober
Copy link
Member

janober commented Mar 15, 2024

Just fyi. Before n8n checks if an Error Workflow is set, it checks if the same workflow contains an Error Trigger node. If it does, it will use that one. Meaning if you add an Error Trigger node to a workflow it becomes its own Error Workflow. But important to remember that it will still be two different executions.

@dkindlund
Copy link
Author

Just fyi. Before n8n checks if an Error Workflow is set, it checks if the same workflow contains an Error Trigger node. If it does, it will use that one. Meaning if you add an Error Trigger node to a workflow it becomes its own Error Workflow. But important to remember that it will still be two different executions.

^ Thanks for the clarification, @janober !

@dkindlund
Copy link
Author

@janober , by the way, is there a way to easily pass data from the first execution over to the second execution (the Error Workflow)?

@dkindlund
Copy link
Author

@Joffcom , thanks for the sanity check -- I've re-posted this item here then:
https://community.n8n.io/t/need-generic-catch-error-mechanism-within-main-workflows/42799

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants