Page MenuHomePhabricator

Mediarequests "Not found" error message is confusing
Open, Needs TriagePublic

Description

The mediarequests API error message for files not found is quite confusing:

"The date(s) you used are valid, but we either do not have data for those date(s), or the project you asked for is not loaded yet. Please check https://wikimedia.org/api/rest_v1/?doc for more information."

This would make sense if it was the message that returned for a a valid media file that simply doesn't have page view data available yet (e.g. too new). But this is also the message returned if you look up a non-existent file name, or even give a completely impossible server location:

https://wikimedia.org/api/rest_v1/metrics/mediarequests/per-file/all-referers/all-agents/INVALIDTITLE/monthly/10000101/99991231

It should give an error such as "there is no such file," so you actually know if the input was invalid, and distinguishes from a data issue in the API.

Event Timeline

@Dominicbm thank you for letting us know that our error messages need improvement.The feedback is very much appreciated!

@SGupta-WMF let's discuss a fix during sprint planning.

After grooming, we realize this is a feature request that we will not be able to prioritize this this sprint.

We will include this in our backlog to include in our future AQS2 enhancement work.