You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 5, 2026. It is now read-only.
REST API needs detailed error messages with HTTP status codes. While WP_Ability::execute() validates internally, it only returns false and logs with _doing_it_wrong(), which doesn't provide capturable error messages. Related code that handles it today:
Consider updating WP_Ability to return WP_Error for better error handling which would then simplify and unify the implementation in REST API controller.
Follow-up for:
REST API needs detailed error messages with HTTP status codes. While
WP_Ability::execute()validates internally, it only returnsfalseand logs with_doing_it_wrong(), which doesn't provide capturable error messages. Related code that handles it today:https://github.com/WordPress/abilities-api/blob/trunk/includes/rest-api/endpoints/class-wp-rest-abilities-run-controller.php#L137L144
https://github.com/WordPress/abilities-api/blob/dd94fce1a6ba8930d39f2011fa1e6147f9759ad8/includes/rest-api/endpoints/class-wp-rest-abilities-run-controller.php#L164L169
Consider updating
WP_Abilityto returnWP_Errorfor better error handling which would then simplify and unify the implementation in REST API controller.