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

Should respond with HTTP status 409 Conflict when request fails because it violates uniqueness constraints #217

Open
andersthorbeck opened this issue Jun 12, 2018 · 2 comments

Comments

@andersthorbeck
Copy link

Under different circumstances, both creating and updating a group has failed for me with HTTP status 400.
It took me a little while to figure out that in both cases, the underlying issue was that the group's intended new name was already in use by another group.

In such situations, wouldn't it make more sense to respond with HTTP status 409 Conflict instead of the very generic 400 Bad Request? 400 Bad Request could mean anything, even that your request can't be parsed. 409 Conflict is much more specific and helpful, in my opinion.

@andersthorbeck
Copy link
Author

This issue has occurred again, where time was wasted debugging what was wrong with the format of our request, after we received a 400 Bad Request instead of a 409 Conflict when we attempted to create a group whose name already was in use by an existing group.

@andersthorbeck
Copy link
Author

This issue persists. It would be very useful if the response statuscode for this case could be 409 Conflict, so that we can more easily identify this problem and handle it accordingly.

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

No branches or pull requests

1 participant