Page MenuHomePhabricator

wikibase-api-not-recognized-language should include the invalid language code
Closed, ResolvedPublic

Description

My bot tried to edit https://www.wikidata.org/wiki/Q20427242 , but failed:

not-recognized-language: The supplied language code was not recognized. [messages:[{u'html': {u'*': u'The supplied language code was not recognized.'}, u'name': u'wikibase-api-not-recognized-language', u'parameters': []}]; help:See https://www.wikidata.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes.]
<class 'pywikibot.exceptions.OtherPageSaveError'>

Besides the fact it's weird that an invalid language is already in use, the message should return the language code of the offending language.

Event Timeline

Change 866732 had a related patch set uploaded (by Matěj Suchánek; author: Matěj Suchánek):

[mediawiki/extensions/Wikibase@master] Include the invalid language code in API error message

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

matej_suchanek changed the task status from Open to In Progress.Jan 6 2023, 6:11 PM
matej_suchanek claimed this task.

Change 866732 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Include the invalid language code in API error message

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