fix: get corrent erros on mapper save

This commit is contained in:
vnmedeiros 2024-07-13 19:09:54 -03:00
parent 3b30216fec
commit 5fdde991c9
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ class REST_Metadatum_Mappers_Controller extends REST_Controller {
} else {
return new \WP_REST_Response([
'error_message' => __('One or more values are invalid.', 'tainacan'),
'errors' => $prepared->get_errors(),
'errors' => $metadatum->get_errors(),
'metadatum' => $this->prepare_item_for_response($prepared, $request),
], 400);
}