ASP.NET Core 5 Web API returns 404 code instead of 401 when the user is unauthenticated
I have an Web API written based on ASP.NET 5 framework with Swagger UI. When the user make an authenticated request to any of the endpoint, I get 404 "like if the framework is redirecting the user to a page…