Nodejs library that provides high-level APIs for obtaining information on various entertainment media such as books, movies, comic books, anime, manga, and so on.
Make a request to the API endpoint ${url}/meta/tmdb/info/85937?type=tv
Expected behavior
The API should return detailed information about the TV show Demon Slayer including its title, description, genres, episodes, ratings, and other relevant data.
Actual behavior
The API returns an error response with the following details:
{
"statusCode": 500,
"error": "Internal Server Error",
"message": "Cannot read properties of undefined (reading 'startsWith')"
}
The totalSeasons filtering step is where the issue occurs. The log shows that after applying the totalSeasons filter the findMedia.results becomes an empty array.
Describe the bug
Unexpected tmdb/info response
Steps to reproduce
Make a request to the API endpoint ${url}/meta/tmdb/info/85937?type=tv
Expected behavior
The API should return detailed information about the TV show Demon Slayer including its title, description, genres, episodes, ratings, and other relevant data.
Actual behavior
The API returns an error response with the following details: { "statusCode": 500, "error": "Internal Server Error", "message": "Cannot read properties of undefined (reading 'startsWith')" }
Additional context
This error is only happening with Demon Slayer.