[wp-trac] [WordPress Trac] #52317: REST API: Improve JSON Schema validation error codes
WordPress Trac
noreply at wordpress.org
Sun Jan 17 02:31:45 UTC 2021
#52317: REST API: Improve JSON Schema validation error codes
-------------------------------+--------------------
Reporter: TimothyBlynJacobs | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 5.7
Component: REST API | Version: 4.7
Severity: normal | Keywords:
Focuses: |
-------------------------------+--------------------
`rest_validate_value_from_schema` currently has a mix of error codes in
use. Some are nice and specific like `rest_invalid_date` but most are the
unhelpful `rest_invalid_param`. Right now, this doesn't have much of an
impact since the individual errors from `rest_validate_value_from_schema`
are not returned to clients. But in preparation for #46191, we should take
this opportunity to make them more useful, as after it may be more of a BC
break.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52317>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list