Page MenuHomePhabricator

assertuserfailed error should take precedence over too-many-titles
Closed, ResolvedPublic

Description

If I do the API query "https://fr.wikipedia.org/w/api.php?action=query&prop=info&titles=1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51&assert=user" without being logged in, I get an error "too-many-titles" because there are more than 50 titles.

I do expect a failure for this query, but not this one: because of "assert=user", I would expect to get "assertuserfailed".

Note that for a logged-in bot, this would be a valid query, since the limit is 500 instead of 50.

Rationale : I run a bot on a server, and it sometimes get disconnected. It is able to detect and recover from this situation if it gets "assertuserfailed". But if I get arbitrary errors instead of this one when I specify assert=user, I don't know how I can reliably deal with this situation.

Event Timeline

Change 441215 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] API: Check assert parameters earlier in the request

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

Change 441215 merged by jenkins-bot:
[mediawiki/core@master] API: Check assert parameters earlier in the request

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

Vvjjkkii renamed this task from assertuserfailed error should take precedence over too-many-titles to foaaaaaaaa.Jul 1 2018, 1:02 AM
Vvjjkkii removed Anomie as the assignee of this task.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii edited subscribers, added: Anomie; removed: gerritbot, Aklapper.
CommunityTechBot renamed this task from foaaaaaaaa to assertuserfailed error should take precedence over too-many-titles.Jul 2 2018, 1:31 PM
CommunityTechBot assigned this task to Anomie.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot edited subscribers, added: gerritbot, Aklapper; removed: Anomie.

This should be deployed to Wikimedia wikis with 1.32.0-wmf.12 or later, see https://www.mediawiki.org/wiki/MediaWiki_1.32/Roadmap#Schedule_for_the_deployments for a schedule.