Prevent default alerts

You can use the event ‘An unhandled error occurs’ to trigger a workflow.
Screenshot 2024-02-28 at 20.50.25

Using this workflow trigger will disable the alerts and allow you to do things such as display your own custom popup/alert.

Inside the workflow itself you will have access to ‘Current Workflow Error’ which will publish an error code and an error message that you can use to differentiate between the various error types.

Be careful using this, if the ‘unhandled error occurs’ event is triggered, it will disable all native alerts, and there are a lot of them (you can find the list on the app settings>languages.
I would recommend adding a fallback which displays the error message to the user if the workflow does not recognise the error code/message OR putting a conditional on the workflow so that it only runs with a subset of errors. If you do not do this, the user will not be shown any alert.

1 Like