Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ratingscombined endpoint 500s when missing RT data #1168

Closed
1 task done
benhaney opened this issue Dec 20, 2024 · 1 comment · Fixed by #1169
Closed
1 task done

ratingscombined endpoint 500s when missing RT data #1168

benhaney opened this issue Dec 20, 2024 · 1 comment · Fixed by #1169
Labels
bug Something isn't working confirmed This bug has been reproduced

Comments

@benhaney
Copy link
Contributor

Description

The rotten tomatoes algolia search API used by jellyseerr does not guarantee that the objects in results.hits will contain a rottenTomatoes entry, but jellyseerr's RottenTomatoes API client's getMovieRatings function tries to access keys within the rottenTomatoes object without checking if it exists first. If it doesn't exist, the whole function throws, which causes jellyseerr's ratingscombined endpoint to 500 even if there are other valid ratings from other sources.

Version

Latest develop

Steps to Reproduce

Go the movie details page for any movie which is currently on RT but has no official ratings, such as /movie/791042 (which corresponds to this RT page). Observe in dev tools that the ratingscombined API request 500s and no other ratings (except for TMDB's) are visible, even if they should exist.

Screenshots

Jellyseerr ratings box for movie 791042:
Screen Shot 2024-12-20 at 12 37 49 AM

Dev tools for same page:
Screen Shot 2024-12-20 at 12 38 08 AM

Ratings box for the same page after a local fix (note the unrelated IMDB rating now appears):
Screen Shot 2024-12-20 at 12 34 05 AM

Logs

[debug][API]: Something went wrong retrieving movie ratings {"errorMessage":"[RT API] Failed to retrieve movie ratings: Cannot read properties of undefined (reading 'certifiedFresh')","movieId":"791042"}

Platform

desktop

Database

None

Device

Mac

Operating System

macOS

Browser

Chromium

Additional Context

No response

Code of Conduct

  • I agree to follow Jellyseerr's Code of Conduct
@benhaney benhaney added awaiting triage This issue needs to be reviewed bug Something isn't working labels Dec 20, 2024
@benhaney
Copy link
Contributor Author

I just noticed this problem is identical to #1018 but for movies instead of tv shows

@gauthier-th gauthier-th added confirmed This bug has been reproduced and removed awaiting triage This issue needs to be reviewed labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed This bug has been reproduced
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants