Page MenuHomePhabricator

Incomplete error message in Wikibase api wbeditentity when omitting title or site parameters
Closed, ResolvedPublic


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.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 425572 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/Wikibase@master] Fix ModifyEntity/EditEntity parameter validation

Change 425572 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Fix ModifyEntity/EditEntity parameter validation

hoo removed a project: Patch-For-Review.