Knowing that this is the correct way to call the wbeditentity API:
action: 'wbeditentity' site: 'enwiki' title: 'asd' data: { some data }
I've discovered that if you do a wrong API request, e.g. omitting the site or the title parameters, the wbeditentity throws this wrong error message:
The required parameter "$1" was missing.
The correct behaviour should be one of the followings:
The required parameter "site" was missing. The required parameter "title" was missing.
If it can help, probably the error is defined here as wikibase-api-param-missing and used in the source code as param-missing.