Can I reuse a global error handler in multiple workflows?

Hi all,

We have a bunch of workflows, and want to be notified when any of them fails.

Currently, I'm recreating the same minimal global error handler ( Troubleshoot workflow errors | Retool Docs ) in every single workflow. But this is time consuming, hard to update, and error prone. (e.g. I just realized it would be nice to add some retries to it, but now I would need to change that everywhere and redeploy every workflow)

Is there a better way to be notified if any workflow run fails?

2 Likes

You can create a generic workflow handler and add it to query library.

Once you have it in query library you can use it as Error Handler or pass additional values if you want to customize it for different workflows so you only have to maintain one piece of code :+1:

1 Like

Thanks! That helps a little, but I still need to manually add it to every workflow, every time set it as a global error handler, and every time set the retries.

+1

this would be def be rather handy. in some situations it could shrink workflow and app size, especially if every error handler creates it's own little js scope somewhere (it sounds like in this case there would be tons of duplicate code somewhere)

1 Like

Yeah seems the QL helps maintain the code and have consistency across the board but also I support the opinion having a "global" error handler or log where you can review these audit style instead of going towards building your own system and notifications.

Hi @Lorenzo_Buonanno, welcome to the forum! :wave:
We created an internal FR for this. We'll update you here with any updates from our devs.

1 Like