api: measurement_meta API should return 404 and error when a measurement does not exist
Open
Nobody has claimed this yet.
backend
funder/otffoss2025
- Dominant language
- Python
- Stars
- 61
- Forks
- 33
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 3
Description
Currently when I search for a report_id that does not exist I get back an empty data structure, instead we should properly set the HTTP status code to 404 and return an appropriate error message.
To reproduce try:
$ curl -v 'https://api.ooni.io/api/v1/measurement_meta?report_id=20190812T174727Z_AS21277_DOESNOTEXIT&full=true'
< HTTP/2 200
< server: nginx/1.14.2
< date: Mon, 30 May 2022 15:56:04 GMT
< content-type: application/json
< content-length: 3
< x-ratelimit-remaining: 3999
< access-control-allow-origin: *
< x-cache-status: EXPIRED
< x-cache-status: EXPIRED
<
{}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.