WordPress/wp-includes/rest-api
K. Adam White fe29c9c881 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.


Built from https://develop.svn.wordpress.org/trunk@41737


git-svn-id: http://core.svn.wordpress.org/trunk@41571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 16:24:46 +00:00
..
endpoints REST API: Return 409 status when attempting to create an existing term. 2017-10-04 16:24:46 +00:00
fields Docs: Remove @access notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-rest-request.php Docs: Replace HTTP links to stackoverflow.com in DocBlocks with HTTPS. 2017-07-30 14:52:44 +00:00
class-wp-rest-response.php Docs: Remove @access notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-rest-server.php REST API: Exclude numeric parameters from regex parsing 2017-08-03 19:55:43 +00:00