UseExceptionHandler does not work with RenderControllers
Hello,
I have a page in my Umbraco site that uses the standard RenderController and I can access it with the path /500
Now I want to setup the Exception Hanlder middleware to show this page in the event of an internal server error.
So I add this to my startup.cs:
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseExceptionHandler("/500");
...
Then I throw a new exception on my homepage controller to test this out.
In the console, I get an error saying the Exception handler returned a 404 but this is not allowed.
We can get around this by allowing 404s on the exception handler with this:
UseExceptionHandler does not work with RenderControllers
Hello,
I have a page in my Umbraco site that uses the standard RenderController and I can access it with the path /500
Now I want to setup the Exception Hanlder middleware to show this page in the event of an internal server error.
So I add this to my startup.cs:
Then I throw a new exception on my homepage controller to test this out. In the console, I get an error saying the Exception handler returned a 404 but this is not allowed.
We can get around this by allowing 404s on the exception handler with this:
But then I get the blank browser default 404 error page. Because the issue is that it can not find my page so it can't display it.
If I set the Exception Handling Path to a static .HTML file or a SurfaceController or a custom controller with a custom route, it works.
It just does not work when you point to a RenderController.
I feel like this is something it should be able to handle.
Any advice appreciated!
is working on a reply...