When a json for action=wbeditentity contains a snak, but that snak has no datavalue key the following error is given:
{code=internal_api_error_InvalidArgumentException, info=Exception Caught: Wikibase\SnakObject::newFromType got an array with to few constructor arguments}
The validation of the json should give a better error here to see the cause of the exception, instead of looking at the source.