Page MenuHomePhabricator

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

Description

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 project: Wikidata. · View Herald TranscriptJan 17 2018, 11:43 PM
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

https://gerrit.wikimedia.org/r/425572

hoo claimed this task.Apr 11 2018, 5:46 PM

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

https://gerrit.wikimedia.org/r/425572

hoo closed this task as Resolved.Apr 12 2018, 1:28 PM
hoo removed a project: Patch-For-Review.