fix: get corrent erros on mapper save
This commit is contained in:
parent
3b30216fec
commit
5fdde991c9
|
@ -159,7 +159,7 @@ class REST_Metadatum_Mappers_Controller extends REST_Controller {
|
||||||
} else {
|
} else {
|
||||||
return new \WP_REST_Response([
|
return new \WP_REST_Response([
|
||||||
'error_message' => __('One or more values are invalid.', 'tainacan'),
|
'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),
|
'metadatum' => $this->prepare_item_for_response($prepared, $request),
|
||||||
], 400);
|
], 400);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue