What is the proper way to indicate there was a problem from a custom trigger in "Before Create" action type? For example, if a sync process fails, I want the record to fail being created and drop the user back on the screen where they can edit the details of the new record.
If I use a regular Exception, the user gets a full-screen error message, from which they can't navigate. The record is not created (as expected), but if they hit back and try to modify, when hitting "Save" they will get "This request has already been processed."
If I use a TriggerException, the record succeeds anyway, and the message is displayed in a banner at the top with a green background. I like the banner message, but I don't want the record to succeed, because, well, I threw an exception for a reason.
What is the proper way to prevent a "Before Action" function from finishing if an integration custom trigger fails?