[wp-trac] [WordPress Trac] #53056: REST API json_encode error returns 500 data->status in body(Correct) but 200 in actual status(Incorrect).

WordPress Trac noreply at wordpress.org
Tue May 18 18:59:08 UTC 2021


#53056: REST API json_encode error returns 500 data->status in body(Correct) but
200 in actual status(Incorrect).
-------------------------------------------------+-------------------------
 Reporter:  lalitjalandhar                       |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  5.8
Component:  General                              |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  good-first-bug has-patch has-unit-   |     Focuses:  rest-api
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by hermpheus):

 Thank you @lalitjalandhar for the excellent example, and thank you
 @desrosj for the excellent suggestion.

 I have a patch available that should address this issue. It has an
 automated test and also works for me in the browser and Postman. Please
 let me know if any changes should be made. Thanks!

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


More information about the wp-trac mailing list