Skip to content

Fix Harvest API: /harvest_record_errors can't accept harvest_source_id parameter #5809

@neilmb

Description

@neilmb

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

  1. 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.

Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSoftware defect or bug

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions