This event is triggered if the user interacts with an element, like clicking a button, and there is an error handling for that interaction. This event is only triggered if no 'An element has an error running a workflow' event specific to the element runs. This will execute if the error happens anywhere on the page and happens for both expected errors, such as a failed login attempt, and unexpected errors, such as a bug with the Bubble platform.
If no error workflows are defined, the default is to display an alert with an error message. If at least one error workflow runs successfully, i.e., the condition passes and the workflow runs without an error, the error message will not be displayed, and the workflow notifies the user that an error occurred, if appropriate.
Use 'Current workflow error' to see the original error message. It has two properties, 'code' and 'message.' 'code' is a short phrase to use in conditions. 'message' is the error message that would display if there were no error workflows. Use 'message' to show the message in an Alert element, for example. Do not use 'message' in conditions since it is language-dependent and can change. 'code' will always be the same no matter what language the app displays. The codes and error messages are listed in the Languages section in the Settings Tab.
For error workflows meant to provide a nicer response to unexpected errors, we do not recommend reading data from the database or an external API because if the error is caused by a network or connectivity issue, the error workflow may also fail if it relies on data that cannot be loaded. If the error workflow fails, the user will see an error alert.