[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
Sun Oct 31 06:06:16 UTC 2021


#53056: REST API json_encode error returns 500 data->status in body(Correct) but
200 in actual status(Incorrect).
-------------------------------------------------+-------------------------
 Reporter:  lalitjalandhar                       |       Owner:
                                                 |  TimothyBlynJacobs
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  5.9
Component:  REST API                             |     Version:  4.4
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  good-first-bug has-patch has-unit-   |     Focuses:  rest-api
  tests dev-feedback                             |
-------------------------------------------------+-------------------------
Changes (by TimothyBlynJacobs):

 * owner:  (none) => TimothyBlynJacobs
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"51960" 51960]:
 {{{
 #!CommitTicketReference repository="" revision="51960"
 REST API: Send a 500 status code when JSON encoding fails.

 Previously, a 200 status code would be sent despite the 500 status code
 present in the response body.

 Props hermpheus, lalitjalandhar.
 Fixes #53056.
 }}}

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


More information about the wp-trac mailing list