Skip to content
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

ASP.NET Core Controller Should Return 400 Instead of 404 #20

Closed
commonsensesoftware opened this issue Sep 14, 2016 · 1 comment
Closed
Assignees
Labels

Comments

@commonsensesoftware
Copy link
Collaborator

When an ASP.NET Core route that also uses URL segment API versioning could be matched, but no route matches the specified the API version, then the controller should return 400 instead of 404.

For example:

/v1/orders

This route exists and returns 200.

/v2/orders

This route does not exist, but the route ~/v{version}/orders could exist. The response in this case should be 400 and not 404.

@commonsensesoftware commonsensesoftware self-assigned this Sep 14, 2016
commonsensesoftware pushed a commit that referenced this issue Sep 14, 2016
…int, URL generation and 400 responses are now correctly returned. Fixes #18, #19, and #20
commonsensesoftware added a commit that referenced this issue Sep 14, 2016
…int, URL generation and 400 responses are now correctly returned. Fixes #18, #19, and #20 (#22)
@commonsensesoftware
Copy link
Collaborator Author

Fixed with commit 9f5a605

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant