Skip to content

API can return null/undefined in the results in related/search endpoints #3058

Open

Description

Description

The frontend expects the data.results for the search and related endpoints to be arrays. This is why it throws an error when they are either null or undefined.

The API seems to be returning a non-list value for results which causes the frontend errors.
This was noted by @dhruvkb in the original hot-fix PR: #2833 (comment)

Additional context

We applied hot-fix for the related endpoint on the frontend:
There's an ongoing issue for the search endpoint: https://openverse.sentry.io/share/issue/eb40f50b906643398ebfa974a59901ed/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status

      📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions