Hiding the Umbraco error stack trace
# help-with-umbraco
w
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
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.
In production mode you get a generic 'something went wrong' message instead
w
That's perfect thank you! I didnt think to check that.