NullReference Exception

Hello,

I have this application that retrieves data from the TMDB API, but when I click on Details to be redirected to the Details View, it is returning a NullReference Exception at the TMDBMappingService.

The exception is thrown when I try to get the iso_3166_1 value at the GetRating method. I checked and the value is indeed null after the app fetches the Movie data. I'm trying to figure out what's happening but so far I haven't been lucky. I appreciate any help.

Repo: https://github.com/murilodab/Cinemanage/blob/main/Services/TMDBMappingService.cs

The exception is thrown at line 126.
GitHub
.NET Core MVC app to track and manage movies/shows - murilodab/Cinemanage
Was this page helpful?