In some situations, the AQS 2.0 Unique Devices service returns success (200) and empty data, while the production service returns an error (404). We should match production behavior.
Here are urls that illustrate this inconsistency:
https://wikimedia.org/api/rest_v1/metrics/unique-devices/wrongwebsitefortesting.org/all-sites/monthly/20220701/20220929
http://localhost:8080/metrics/unique-devices/wrongwebsitefortesting.org/all-sites/monthly/20220701/20220929
Here are some more:
http://localhost:8080/metrics/unique-devices/en.m.wikipedia/all-sites/daily/20210101/20210201
https://wikimedia.org/api/rest_v1/metrics/unique-devices/en.m.wikipedia/all-sites/daily/20210101/20210201
Note:
Where reasonably possible, we should extract changes that affect all AQS 2.0 services to the aqsassist package. That way, we don't have to make this same change in all the services, and if further changes are necessary we will then only have to make them in one place.
If a change is likely to affect all Go services at WMF and not just AQS 2.0, we should extract that to the Go service scaffolding, so that future services can benefit from it.