-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
analyzerIndicates an issue which is related to analyzer experienceIndicates an issue which is related to analyzer experiencearea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.feature-openapi
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
If an action just has a throw expression and no return, the analyzer throws a NullArgumentException with no other information or location in the code.
Expected Behavior
No exception is thrown, or a proper warning about never returning is given
Steps To Reproduce
Exceptions (if any)
CSC : warning AD0001: Analyzer 'Microsoft.AspNetCore.Mvc.Api.Analyzers.ApiConventionAnalyzer' threw an exception of type 'System.ArgumentNullException' with message 'Value cannot be null. (Parameter 'target')'.
.NET Version
7.0.302
Anything else?
No response
Metadata
Metadata
Assignees
Labels
analyzerIndicates an issue which is related to analyzer experienceIndicates an issue which is related to analyzer experiencearea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.feature-openapi