#46252 closed enhancement (fixed)
Enhance Error Message for Meta Fields
Reported by: | apermo | Owned by: | TimothyBlynJacobs |
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | minor | Version: | |
Component: | REST API | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
<?php return new WP_Error( 'rest_meta_database_error', __( 'Could not update meta value in database.' ), array( 'key' => $name, 'status' => WP_Http::INTERNAL_SERVER_ERROR ) ); ?>
These 3 Error messages are actually not helpful, if you submit multiple meta fields, you don't know (at least not on the remote site) which meta was throwing the error.
It would be more helpful/self explaining if the error message was more like:
sprintf( __( 'Could not update the meta value "%s" in database.' ), $meta_key ),
this way you could directly tell which meta field is throwing the error.
Attachments (2)
Change History (9)
This ticket was mentioned in Slack in #core-restapi by timothybjacobs. View the logs.
5 years ago
#3
@
5 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 5.3
- Owner set to TimothyBlynJacobs
- Status changed from new to accepted
This ticket was mentioned in Slack in #core-restapi by timothybjacobs. View the logs.
5 years ago
Note: See
TracTickets for help on using
tickets.
I agree this would be a quite helpful improvement.
Considering some of the other metadata improvements planned for 5.3, milestoning for 5.3 as well.