canihavesomecoffee / theTVDbAPI

PHP implementation for the 2nd version of the TheTVDb API
ISC License
11 stars 8 forks source link

502 error from TheTVDB api #26

Closed DariusIII closed 2 years ago

DariusIII commented 2 years ago

I am having issues for some time now, because i am getting the 502 error when checking for episodes info.

[2021-12-05 04:54:26] NNTmux.ERROR: Got status code 502 from service at path series/385118/episodes/default {"exception":"[object] (Exception(code: 0): Got status code 502 from service at path **series/385118/episodes/default** at vendor/canihavesomecoffe>[stacktrace]
#0 vendor/canihavesomecoffee/thetvdbapi/src/Route/SeriesRoute.php(191): CanIHaveSomeCoffee\\TheTVDbAPI\\TheTVDbAPI->performAPICallWithJsonResponse()
#1 Blacklight/processing/tv/TVDB.php(338): CanIHaveSomeCoffee\\TheTVDbAPI\\Route\\SeriesRoute->episodes()
#2 Blacklight/processing/tv/TVDB.php(178): Blacklight\\processing\\tv\\TVDB->getEpisodeInfo()#3 Blacklight/processing/PostProcess.php(248): Blacklight\\processing\\tv\\TVDB->processSite()
#4 misc/update/postprocess.php(123): Blacklight\\processing\\PostProcess->processTv()
#5 {main}

Interesting enough, the swagger fails too:

https://api4.thetvdb.com/v4/series/385118/episodes/default?page=0&season=1&episodeNumber=1

image

canihavesomecoffee commented 2 years ago

I'll check on that tomorrow, but the fact that their own swagger fails too is not a good sign... Let's hope it's just an update they didn't announce (and forgot to update the swagger)

DariusIII commented 2 years ago

I have filled an issue on their github.

https://github.com/thetvdb/v4-api/issues/157

DariusIII commented 2 years ago

It looks like we are getting wrong ids for some reason and that causes the tvdb API to return 502 error. I see that Dexter New Blood is failing because we look for id 412279 while proper ID for it is 412366.

canihavesomecoffee commented 2 years ago

They might have detected duplicate series and deleted one (not always the newest anymore). Happens to my database every now and then too.

Or did you mean something else?

DariusIII commented 2 years ago

That is what i meant.

canihavesomecoffee commented 2 years ago

Not much we can do about it, except for re-searching the series to check for an updated ID when you see this kind of issues popping up.

DariusIII commented 2 years ago

I will have to think of something when this happens. Thanks for prompt responses!

canihavesomecoffee commented 2 years ago

They should rather keep track when they delete a series and throw an error that gives the new ID... That'd fix the issue at once.

Maybe you or I should request such a feature for their API...

DariusIII commented 2 years ago

Since you are developing package that relies on their info, maybe you should be the one to open an issue and i will back you up.