-
Notifications
You must be signed in to change notification settings - Fork 712
System.NullReferenceException: Object reference not set to an instance of an object #837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Interesting... I'm surprised this has never come up before. When the pipeline is re-executed, I would expect that an If you have a repro, great; otherwise, I believe I can create one fairly easily. I'm certain this is a bug, but I'd like a better understanding of the state of things when this happens. API versions should never be reported for an endpoint invoked due to an exception (they're not versioned after all). |
Confirmed. It's a 🐞 . It will be fixed in the next release. Thanks for trying things out and reporting it. |
|
Asp.Versioning.Mvc.ApiExplorer:6.0.0-preview.3
netcore:net6
After the
UseExceptionHandler
is enabled, an "NullReferenceException" is thrown when the interface exception occurs.Program.cs:
TestController.cs
error:
The possible cause is the following code in "ExceptionHandlerMiddleware"
https://github.com/dotnet/aspnetcore/blob/02646222b7e6fb70a2fce0d3e2545ab3fae31138/src/Middleware/Diagnostics/src/ExceptionHandler/ExceptionHandlerMiddleware.cs#L176
The text was updated successfully, but these errors were encountered: