Making a wrong request to the API returns 'badvalue' in the request header. It is described one the API page of Wikidata that the Request Header includes "MediaWiki-API-Error", but the error code 'badvalue' is not documented.
Replicate it:
api.php?action=blub&languages=en&ids=Q42&format=json