Harvest-API: `per_page=0` on list endpoints returns results instead of zero or an error
Open
API
bug
Harvester
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 200
- Avg merge
- 4h 56m
- Merged PRs (30d)
- 5
Description
**Description**
Passing per_page=0 to any list endpoint returns a full page of results rather than zero results or a validation error.
**Steps to Reproduce**
GET https://harvest.data.gov/harvest_sources/?per_page=0
**Expected Behavior**
Zero results or HTTP 422.
**Actual Behavior**
Returns a full page of results as if the parameter was ignored.
**Notes**
Confidence: MEDIUM -- tested on /harvest_sources/ only. Needs confirmation on other list endpoints. Also test per_page=-1 for consistency.
Contributor guide
Assessment
This issue has not been assessed yet.