[wp-trac] [WordPress Trac] #45851: Http Status Codes are too much generic

WordPress Trac noreply at wordpress.org
Tue Jan 8 15:54:46 UTC 2019


#45851: Http Status Codes are too much generic
--------------------------+------------------------------
 Reporter:  astronati     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Taxonomy      |     Version:  5.0
 Severity:  normal        |  Resolution:  wontfix
 Keywords:                |     Focuses:  rest-api
--------------------------+------------------------------

Comment (by TimothyBlynJacobs):

 Sure! The idea is to instead look at the code in the error response body.
 In this case `term_exists`.


 {{{
 {
   "code": "term_exists",
   "message": "A term with the name provided already exists in this
 taxonomy.",
   "data": {
     "status": 400,
     "term_id": 22
   }
 }
 }}}

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


More information about the wp-trac mailing list