-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Open
Labels
area-middlewareIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewares
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
When using the new .NET 7 ProblemDetails-based exception handling, the middleware pipeline is not reexecuted during ExceptionHandler execution in ExceptionHandlerMiddlewareImpl.
This leads to the clearing of headers that were set during the initial middleware execution,
after problem details are returned in DefaultProblemDetailsWriter.
Have I misconfigured my ASP.NET application / is there a correct way of reexecuting middleware when returning ProblemDetails using a custom IExceptionHandler?
Reproducible example: https://github.com/daniel-dewa/ErrorDetailsExample
Expected Behavior
I expect middleware to be reexecuted or not be cleared when returning an exception.
.NET Version
9.0.108
Anything else?
ASP.NET Core version: Microsoft.AspNetCore.App 9.0.7
Might have something to do with #51888?
Metadata
Metadata
Assignees
Labels
area-middlewareIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewares