Page MenuHomePhabricator

Proper user input checking for the Commons recon service
Closed, ResolvedPublic

Description

The Commons recon service should have some proper checks on the parameters supplied by the user, and should output meaningful error messages when the API call is ill-formed. The HTTP status code should be set accordingly.

This requires a review of all the routes and adding the necessary checks on the parameters, with appropriate error messages.

For instance, submitting an invalid JSON blob as reconciliation query currently returns an HTTP 500 error:
https://commonsreconcile.toolforge.org/en/api?queries={%22q0%22

Event Timeline

Change 748693 had a related patch set uploaded (by Eugene233; author: Eugene233):

[labs/tools/commons-recon-service@main] Proper user input checking for the Commons recon service

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

Spinster subscribed.

Let's finish current (basic) work on this task for now - more work needs to be done later, but we can stall this after merging the current patch.

Change 748693 merged by jenkins-bot:

[labs/tools/commons-recon-service@main] Proper user input checking for the Commons recon service

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