[wp-trac] [WordPress Trac] #64867: Improve AI Client error handling
WordPress Trac
noreply at wordpress.org
Tue Mar 17 14:28:56 UTC 2026
#64867: Improve AI Client error handling
--------------------------------------+-----------------------
Reporter: flixos90 | Owner: flixos90
Type: task (blessed) | Status: closed
Priority: normal | Milestone: 7.0
Component: AI | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-----------------------
Changes (by flixos90):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"62037" 62037]:
{{{
#!CommitTicketReference repository="" revision="62037"
AI: Improve AI Client error handling.
Prior to this changeset, the WordPress AI Client would handle every
exception thrown in the PHP AI Client in the same way, losing meaningful
nuance about different kinds of errors along the way.
Now, the `WP_Error` objects returned by the WordPress AI Client come with
more helpful error codes, and they include semantic HTTP status codes as
well so that they can be used in relevant contexts out of the box, like
e.g. the REST API.
Props flixos90, gziolo.
Fixes #64867.
See #64591.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64867#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list