[wp-trac] [WordPress Trac] #41370: REST API: Attempting to create an existing term yields HTTP 500

WordPress Trac noreply at wordpress.org
Wed Oct 4 16:23:35 UTC 2017


#41370: REST API: Attempting to create an existing term yields HTTP 500
-------------------------------------------------+-------------------------
 Reporter:  jnylen0                              |       Owner:  kadamwhite
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  4.9
Component:  REST API                             |     Version:  4.7
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  good-first-bug has-unit-tests has-   |     Focuses:  rest-api
  patch commit                                   |
-------------------------------------------------+-------------------------
Changes (by kadamwhite):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"41737"]:
 {{{
 #!CommitTicketReference repository="" revision="41737"
 REST API: Return 409 status when attempting to create an existing term.

 Fixes an issue where submitting a well-formed request to create a term
 inappropriately returns a 500 error status if that term already exists.
 HTTP 5xx error codes should be reserved for unexpected server errors, so
 "409 Conflict" is a more appropriate response.

 Props alibasheer, guzzilar, shooper.
 Fixes #41370.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41370#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list