The following message was registered in application insights in production:
The exception handler configured on ExceptionHandlerOptions produced a 404 status response. This InvalidOperationException containing the original exception was thrown since this is often due to a misconfigured ExceptionHandlingPath. If the exception handler is expected to return 404 status responses then set AllowStatusCode404Response to true.
Looking into this we see that the ExceptionHandlier is pointed to a non existent endpoint.
We need to either ensure that the endpoint exists or find a solution that doesn't require an endpoint. Is there a default handler that can be used instead?
Steps To Reproduce
Force an exception that isn't handled by the logic, but bobble up to the built in middleware.
Additional Information
A simple fix would be to add a Controller to support the missing endpoint. We've done this in other applications.
Description of the bug
The following message was registered in application insights in production:
Looking into this we see that the ExceptionHandlier is pointed to a non existent endpoint.
Program.cs L277
We need to either ensure that the endpoint exists or find a solution that doesn't require an endpoint. Is there a default handler that can be used instead?
Steps To Reproduce
Force an exception that isn't handled by the logic, but bobble up to the built in middleware.
Additional Information
A simple fix would be to add a Controller to support the missing endpoint. We've done this in other applications.