[wp-trac] [WordPress Trac] #49426: Site Health: the Rest API test doesn't display the WP_Error code
WordPress Trac
noreply at wordpress.org
Thu Feb 13 15:04:23 UTC 2020
#49426: Site Health: the Rest API test doesn't display the WP_Error code
---------------------------------------+------------------------------
Reporter: afercia | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Site Health | Version: 5.2
Severity: normal | Resolution:
Keywords: has-screenshots has-patch | Focuses: ui
---------------------------------------+------------------------------
Changes (by afercia):
* keywords: has-screenshots => has-screenshots has-patch
Comment:
[attachment:"49426.diff"]
- Uses `get_error_message()` for the WP_Error case
- `WP_Error` error codes aren't that useful for users, for example:
`bad_request`, `http_request_failed`, etc.: moved the error code at the
end of the string in a less prominent place
- not sure why the `WP_Error` error code was displayed between square
brackets while the HTTP error codes are displayed between parenthesis:
standardized to parenthesis
- tried to clarify the related translators comments
See the screenshot below with the error code now displayed at the end of
the string.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49426#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list