Hi
We're running APEX 21.2.6 and have code to show a custom error message when there is an unhandled error. The message is along the lines of "An unexpected error occurred, please quote reference 123456" and is raised from a when others exception.
We have a lot of error handling, so this really is only when something unexpected has happened. This was working, but at some point it appears to have stopped. As these errors don't occur very often (they shouldn't happen at all) it's difficult to know when this stopped working as it's only been found as I deliberately broke something to test some error handling.
When we call apex_error.add_error from within a process on a page then it works fine. But when it is called from an exception handler (others, no_data_found etc.) then it displays the Oracle error message instead.
It's definitely firing the code because if you click on the (i) it says the original message e.g.
Unfortunately it is just the "no data found" message that is displayed to the user.
I've tried to reproduce this on apex.oracle.com with similar code, but it works fine:
Notice that "original message" is only on our app.
This feels like there is a setting that we need to change since upgrading, but I can't find an obvious one or think why you'd want to show the Oracle error rather than your custom message...
Does anyone have any ideas as to why the original message is being changed? And how I can fix it?
Many thanks for any suggestions!
Sara