[wp-trac] [WordPress Trac] #60014: REST endpoint: Output "server errors" if WP_DEBUG = true (register_rest_route)
WordPress Trac
noreply at wordpress.org
Tue Feb 13 09:08:59 UTC 2024
#60014: REST endpoint: Output "server errors" if WP_DEBUG = true
(register_rest_route)
------------------------------+---------------------------
Reporter: ecc | Owner: spacedmonkey
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.5
Component: REST API | Version: 6.4
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses: rest-api
------------------------------+---------------------------
Changes (by spacedmonkey):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"57610" 57610]:
{{{
#!CommitTicketReference repository="" revision="57610"
REST API: Provide detailed error data in REST API response.
When the fatal error handler is triggered within a REST API request, it
currently utilizes wp_die to display a specially formatted error response.
However, crucial information captured by the fatal error handler, such as
the exact line where the error occurred, is not included in the response
due to potential security concerns, such as leaking file paths.
To address this limitation and aid developers in debugging, this
enhancement introduces the inclusion of error data in the response when
the `WP_DEBUG_DISPLAY` constant is set to true. This additional data,
appended under the new key error_data, will facilitate more thorough
debugging for REST API errors.
Props ecc, spacedmonkey, TimothyBlynJacobs, rcorrales.
Fixes #60014.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60014#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list