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
Ambert
10/07/2023, 5:35 AM
Hi @Matthew Alexandros !
Ambert
10/07/2023, 5:35 AM
Copy code
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseExceptionHandler("/500.html");
}
Ambert
10/07/2023, 5:36 AM
You can do this in your startup file, then the user gets redirected to your friendly error page
Ambert
10/07/2023, 5:37 AM
I can recommend surrounding it with something like `if (!env.IsDevelopment)
Ambert
10/07/2023, 5:38 AM
So.this will only trigger on your production/test environments and not on your local one 🙂