Invalid after cursor parameter returns 500 with HTML error page
Open
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 200
- Avg merge
- 4h 56m
- Merged PRs (30d)
- 5
Description
## Description
Passing a malformed value to the `after` pagination cursor parameter on `/search` returns HTTP 500 with an HTML "Site unavailable" page instead of a JSON error response.
## Steps to Reproduce
GET https://catalog.data.gov/search?after=NOTAVALIDCURSOR
## Expected Behavior
HTTP 400 or 422 with a JSON error body explaining the cursor is invalid.
## Actual Behavior
HTTP 500 with an HTML page. Any client parsing the response as JSON will break with no actionable information.
## Notes
Confirmed April 27, 2026. Any malformed cursor value triggers this consistently.
Contributor guide
Assessment
This issue has not been assessed yet.