EST API: Preserve custom status for ability validation errors
he REST run controller for the Abilities API already preserves a custom HTTP status returned by `wp_ability_normalize_input` filter errors. Apply the same behavior to validation errors from `wp_ability_validate_input`: a `WP_Error` is only defaulted to a 400 status when it does not already include one. The shared defaulting logic is extracted into a new private `ensure_error_status()` helper and reused for both normalization and validation errors. Follow-up to [62398]. See #64311. git-svn-id: https://develop.svn.wordpress.org/trunk@62399 602fd350-edb4-49c9-b593-d223f7449a82
G
Greg Ziółkowski committed
1d51ae58054360b749e8f5714d0071e2c2a6318d
Parent: e39d01c