Project

Profile

Help

Issue #3846

Wrong status code

Added by vdusek over 1 year ago. Updated 6 months ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
Category:
API
Sprint/Milestone:
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 42

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.

History

#1 Updated by CodeHeeler over 1 year ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 39

#2 Updated by daviddavis over 1 year ago

FYI, there are a bunch of other models that have similar unique constraints: publishers, remotes, exporters, distributions, users, artifacts.

#3 Updated by vdusek over 1 year 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.

#4 Updated by vdusek over 1 year ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to vdusek

#5 Updated by dkliban@redhat.com over 1 year ago

  • Sprint changed from Sprint 39 to Sprint 40

#6 Updated by vdusek about 1 year ago

  • Status changed from ASSIGNED to POST

#7 Updated by vdusek about 1 year ago

PR: 3569

#8 Updated by rchan about 1 year ago

  • Sprint changed from Sprint 40 to Sprint 41

#9 Updated by rchan about 1 year ago

  • Sprint changed from Sprint 41 to Sprint 42

#10 Updated by vdusek about 1 year ago

  • Status changed from POST to CLOSED - WONTFIX

Based on the reaction of upstream and discussion on the PR.

#11 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#12 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF