[wp-trac] [WordPress Trac] #58255: wp_send_json_error should respect error state passed in WP_Error.
WordPress Trac
noreply at wordpress.org
Thu May 4 11:00:43 UTC 2023
#58255: wp_send_json_error should respect error state passed in WP_Error.
----------------------------+-----------------------------
Reporter: spacedmonkey | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version:
Severity: normal | Keywords: good-first-bug
Focuses: |
----------------------------+-----------------------------
WP_Error objects support setting the error state. This is used heavily in
the REST API. The function `wp_send_json_error` supports error status code
and passing WP_Error as an argument. The `wp_send_json_error` function
could respect the status code in WP_Error.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58255>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list