Steps to replicate the issue (include links if applicable):
- Make a request with an invalid route endpoint using the local unique devices endpoint
Prod :
import requests prod_url = 'https://wikimedia.org/api/rest_v1/metrics/unique-devices//en.wikipedia.org/all-sites/daily/20200220/20200225' header = {"accept": "application/json", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"} response = requests.get(prod_url, headers=header) print(response.status_code) print(response.json())
Local:
import requests base_url = "http://localhost:8089/metrics/unique-devices//en.wikipedia.org/all-sites/daily/20200220/20200225" header = {"accept": "application/json", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"} response = requests.get(base_url, headers=header) print(response.status_code) print(response.json())
What happens?:
- In Prod this returns a 404 with and error json
{'type': 'https://mediawiki.org/wiki/HyperSwitch/errors/not_found#route', 'title': 'Not found.', 'method': 'get', 'uri': '/wikimedia.org/v1/metrics/unique-devices//en.wikipedia.org/all-sites/daily/20200220/20200225'}
- In local it returns a 200 with proper data ( This should not be the case)
What should have happened instead?:
- returns a 404 with and error json ( Similar to production )
Software version (skip for WMF-hosted wikis like Wikipedia):
N/A
Other information (browser name/version, screenshots, etc.):
N/A