- This topic has 1 reply, 2 voices, and was last updated 1 month, 2 weeks ago by .
I noticed that if an incorrect key is sent to a post or custom post type (in the meta_box object) that (in our case got removed before we finalized our Schema) a fatal error is thrown.
This happens in
rwmb_get_registry( 'field' )->get( $field_id, $object->post_type )in the array loop is false and there for throws the error when passed to
$this->update_value( $field, $value, $object->ID ).
In the JSON spec it refers to returning an error response for invalid parameters: https://jsonapi.org/examples/#error-objects-invalid-query-parameters
Would like to discuss options, as I continue to investigate from my side as well.
The following would be the example curl (where we removed
curl --location --request POST 'https://wp.test/wp-json/wp/v2/customPostType' \
--header 'Accept: */*' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'Cache-Control: no-cache' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic SOMEKEY' \
- You must be logged in to reply to this topic.