status code pages
ASP.NET Core middleware that adds a body, such as Problem Details, to error responses that an endpoint returned without one.
In more detail
It only acts on responses that have an error status and no body. Paired with AddProblemDetails, a bare 404 gets the same error shape as every other failure.
Related terms
- Problem Details — A standard JSON shape for HTTP error responses, defined in RFC 9457, with members such as type, title, status, detail and instance.
- exception handler middleware — ASP.NET Core middleware, added with app.UseExceptionHandler(), that catches unhandled exceptions from later components and returns a safe error response.
Taught in
- Global Exception Handling and Problem Details — Modern .NET Core, C# & Enterprise Microservices