Issue #3846
closedWrong status code
Description
When I want to create a repository with a name which is already used for another repository, it returns status code 400 - Bad Request. According to this topic HTTP response code for POST when resource already exists I would suggest use 409 - Conflict.
Updated by CodeHeeler over 6 years ago
- Triaged changed from No to Yes
- Sprint set to Sprint 39
Updated by daviddavis over 6 years ago
FYI, there are a bunch of other models that have similar unique constraints: publishers, remotes, exporters, distributions, users, artifacts.
Updated by vdusek over 6 years ago
According to the django-rest-framework issue tracker on Github (4509, 5385, ...) it looks like we're not the first to deal with this problem. If I understand it right, collaborators don't have any interest in tackling it themselves or their point of view is that 400 is OK for uniqueness constraints. So I guess we'll have to deal with it by implementing our own subclass of ApiException.
Updated by vdusek over 6 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to vdusek
Updated by dkliban@redhat.com over 6 years ago
- Sprint changed from Sprint 39 to Sprint 40
Updated by vdusek about 6 years ago
- Status changed from POST to CLOSED - WONTFIX
Based on the reaction of upstream and discussion on the PR.
Updated by bmbouter over 4 years ago
- Category deleted (
14)
We are removing the 'API' category per open floor discussion June 16, 2020.