[wp-trac] [WordPress Trac] #28978: wp_send_json_error() should support WP_Error objects

WordPress Trac noreply at wordpress.org
Tue Jul 22 05:12:50 UTC 2014


#28978: wp_send_json_error() should support WP_Error objects
----------------------------------------+-----------------------------
 Reporter:  danielbachhuber             |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Future Release
Component:  General                     |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+-----------------------------

Comment (by rmccue):

 +1. The way we're doing it with the [https://github.com/WP-API/WP-
 API/blob/master/lib/class-wp-json-server.php#L122-L149 REST API] might be
 relevant too; basically we return an array of objects with both `code` and
 `message` properties.

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


More information about the wp-trac mailing list