Customer 500 error page?
# help-with-umbraco
m
Right now if there is a code issue on a page they master layout will display but the conent area is just blank and an error gets loged in the backoffice. Is it possible to implement a customer error page so I can show the end user a friendly message?
a
Hi @Matthew Alexandros !
Copy code
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
    {
        app.UseExceptionHandler("/500.html");
    }
You can do this in your startup file, then the user gets redirected to your friendly error page
I can recommend surrounding it with something like `if (!env.IsDevelopment)
So.this will only trigger on your production/test environments and not on your local one 🙂
d
I've written about custom 500 error pages in my blog a while ago: https://dev.to/d_inventor/dynamic-error-pages-in-umbraco-10-19l3
a
Couldnt find it on my mobile 😄
4 Views