Creating a custom ErrorHandlerMiddleware function

added by DotNetKicks
3/3/2020 10:29:19 AM

531 Views

In this post I show how to customise the ExceptionHandlerMiddleware to create custom responses when an error occurs in your middleware pipeline, instead of providing a path to "re-execute" the pipeline. All .NET applications generate errors, and unfortunately throw exceptions, and it's important you handle those in your ASP.NET middleware pipeline.


0 comments