Hi, does anyone know of a way to hide the stack trace for e.g. an exception thrown in the Backoffice (see attachment).
In the example I am using a custom editor I built that uses Ajax to call a custom UmbracoAuthorizedJsonController action, I am throwing an Exception here to test for the time being.
I would like this to preferably redirect to a custom error page. I have an error handler in place using ApplicationBuilder which I was hoping would handle this too but doesn't.
I'm using Umbraco v10.
Thank you.
d
D_Inventor
07/28/2023, 8:39 AM
Hi there! You shouldn't be able to see stacktraces when you run your application in production mode. You run in production mode by setting the option "Debug" to
false
in your appsettings.json.
D_Inventor
07/28/2023, 8:39 AM
In production mode you get a generic 'something went wrong' message instead
w
wizki9d
07/28/2023, 8:52 AM
That's perfect thank you! I didnt think to check that.