thomst08 / requestrr

Requestrr is a chatbot used to simplify using services like Sonarr/Radarr/Ombi via the use of chat. Current platform is Discord only, but the bot was built around the ideology of quick adaptation for new features as well as new platforms.
MIT License
144 stars 10 forks source link

Error while getting movie details from TheMovieDb #22

Open CiegeNZ opened 3 months ago

CiegeNZ commented 3 months ago

Been using this for of Requestrr for quite a while (since darkalfx) with no issue, been seeing this for the past week or so but been to busy to look into it

Exception:

Requestrr.WebApi.RequestrrBot.DownloadClients.Radarr.RadarrClient[0]
      Error while getting movie details from TheMovieDb: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.

at Requestrr.WebApi.RequestrrBot.DownloadClients.TheMovieDb.HttpGetAsync(HttpClient client, String url) in D:\Users\thoms\Documents\GitHub\requestrr\Requestrr.WebApi\RequestrrBot\DownloadClients\TheMovieDb.cs:line 63
         at Requestrr.WebApi.RequestrrBot.DownloadClients.TheMovieDb.GetMovieDetailsAsync(HttpClient client, String theMovieDbId, ILogger logger) in D:\Users\thoms\Documents\GitHub\requestrr\Requestrr.WebApi\RequestrrBot\DownloadClients\TheMovieDb.cs:line 25

Able to send a command from Discord, and get a list of movies, but when selecting a title, the movie does not return for 100 seconds. After that it loads fine. API key seems to be fine.

Set logging to informational and copy out the TMDB API requests and they are all loading immediately in the browser.

I have checked the code and confirmed that the line 25 API call is the Movie Release Dates, which is the API endpoint from the logs. I see there is an error handler that looks like it is not being hit as there is no message just an exception.

Currently setting up all the dev tools on my personal laptop to check it out cos everything is on the work one.

thomst08 commented 3 months ago

Hey @CiegeNZ, Thanks for reaching out, I have had a quick look over the issue, but I haven't got a solution yet. This hasn't been touched from darkalfx's build, it leads me to think ether there has been too many requests made from this API key at that point in time (but it should return another error) or TMDB's API didn't get the request or is slow to respond.

I will do some testing and see if I can work out a solution here, the wait time might need to be lowered and a second attempt might need to be made, but I will see how the tests go first.