Teekeks / pyTwitchAPI

A Python 3.7 compatible implementation of the Twitch API, EventSub, PubSub and Chat
https://pytwitchapi.dev
MIT License
256 stars 38 forks source link

Some EventSub exceptions seem to have an empty message #88

Closed Daenara closed 3 years ago

Daenara commented 3 years ago

I run into quite a few exceptions when I play around with my software, even though I don't actually change any code around as far as my usage of this api is concerned. First day I got it running I had nearly an hour of constant exceptions even though it worked fine a bit earlier, so I went debugging.

Result was, the exception in question was 500 - Internal Server Error which has an empty message string.

I did get occasional errors yesterday, all with empty message string, might have been 500 again, could have been something else, so I was wondering if you would consider sending the error name from the response if the message string is empty so that there is a chance to see what error actually occured in the code.

Teekeks commented 3 years ago

It seems that the twitch API has massive problems right now, throwing error 500 arround at normal calls. Looking at my code, error 500 could indeed be better handled with throwing its own exception (as it does for the other parts of the api).

Just to clarify tho: you get those errors when you use the listen_ functions, right?

Daenara commented 3 years ago

Yes, they come from the listen functions. It is not that bad, since what I test right now does not rely on the twitch api, but it would be nice to see at first glance if it is just another 500 or a different error