[wp-trac] [WordPress Trac] #42781: HTTP Status code should be a 400 instead of a 409 when attempting to add a term (by slug) that already exist
WordPress Trac
noreply at wordpress.org
Sun Dec 3 19:08:27 UTC 2017
#42781: HTTP Status code should be a 400 instead of a 409 when attempting to add a
term (by slug) that already exist
--------------------------------------+------------------------------
Reporter: shooper | Owner: rachelbaker
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: 4.9
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses: rest-api
--------------------------------------+------------------------------
Changes (by rachelbaker):
* owner: => rachelbaker
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"42354"]:
{{{
#!CommitTicketReference repository="" revision="42354"
REST API: Correct HTTP status code in error for requests to create a
duplicate term.
The 409 error code is intended for situations where it is expected that
the user will resolve the conflict and resubmit the same request. We use
400 error codes for other routes when a duplicate request is made. The 400
status code tells the user they need to modify their request for it to be
successful.
Props shooper.
Fixes #42781. See #41370.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42781#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list