We use an omnibus JSON query builder method for the /harvest_record_errors API endpoint. The omnibus method claims that it accepts harvest_source_id but that doesn't work for /harvest_record_errors which doesn't have a harvest_source_id field in the database.
How to reproduce
- Call https://harvest.data.gov/harvest_record_errors/?harvest_source_id=35d79097-243c-414d-b67e-d8484397abc6
Expected behavior
An error message that the query parameter isn't recognized for that method.
Actual behavior
Ugh, an HTML error page to a JSON API call with just a single sentence on the web page that doesn't say anything about what actually went wrong.
Sketch
We need to fix both the API behavior to return a sensible error message if someone tries this AND the OpenAPI documentation which implies that this should work.