Catalog-API: `/api/location/{id}` returns empty `{}` on 404 instead of consistent error body
Open
API
bug
Catalog
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 200
- Avg merge
- 4h 56m
- Merged PRs (30d)
- 5
Description
### Description
The /api/location/{location_id} endpoint returns an empty JSON object {} on 404, inconsistent with all other endpoints in the API which return {"error": "Not Found"}.
### Steps to Reproduce
GET https://catalog.data.gov/api/location/99999999 GET https://catalog.data.gov/api/location/notanid
### Expected Behavior
HTTP 404 with {"error": "Not Found"} -- consistent with the rest of the API.
### Actual Behavior
HTTP 404 with {} -- empty object, no error field, no message.
### Notes
Confirmed April 27, 2026 on two different invalid inputs.
Contributor guide
Assessment
This issue has not been assessed yet.