[wp-trac] [WordPress Trac] #41370: REST API: Attempting to create an existing term yields HTTP 500
WordPress Trac
noreply at wordpress.org
Sun Sep 17 04:38:26 UTC 2017
#41370: REST API: Attempting to create an existing term yields HTTP 500
-------------------------------------------------+-------------------------
Reporter: jnylen0 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future
Component: REST API | Release
Severity: normal | Version: 4.7
Keywords: needs-unit-tests good-first-bug | Resolution:
needs-testing | Focuses: rest-api
-------------------------------------------------+-------------------------
Comment (by guzzilar):
@alibasheer I was checking at `wp-includes/taxonomy.php: line 1990` on
function '''wp_insert_term()'''.
Would it be better if we change all of `return new WP_Error();` in that
function to return `bad_request 400` instead of `500`?
Seems all of WP_Error in this function shouldn't be `500` neither.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41370#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list