Handle unhandled errors on reusable element

Hey Bubble folks,

I set up a workflow on my reusable Header element (that is on every page of my website) that catches all unhandled errors and sends me an email, so that I can go into the app and set up specific error handlers.

However, I realized that even after setting up specific error handlers on specific pages, the Header workflow still fires. I’m wondering if there is a way to have this workflow fire only if an error hasn’t been handled.

For a specific example, I have a password requirement set up on my /sign-in page. If a user’s password doesn’t meet the requirements, then a workflow gets triggered on the page with the “Any workflow error” workflow, and triggering only when “Current Workflow’s Error Code is PASSWORD_INVALID”. This workflow shows the user an alert.

This works, in the sense that the alert gets shown. However, I still also get an email about the error.

Does anyone know how to set this up so that if I manually handle an error on a specific page, my reusable element workflow doesn’t trigger? Or is this impossible based on how Bubble handles these types of errors?

Thanks!

Here is what the workflow looks like on my /sign-up page. And then the Header workflow is just a plain “Any unhandled error” workflow that sends an email.