-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TwitchHttpClient can have a more accurate message #210
Comments
Yes we know this is not ideal but the library pre dates Helix and its standard error messages and back then we only had Status codes to work with. |
While it isnt ideal it is at least sth.
|
With a bunch of chat functionality being moved over to Helix, I suspect this will trip quite a few more people now. For example, when whispering a user Twitch might return a status code 403 with the message
but TwitchLib outputs this error, which can misguide people quite badly:
Would it be acceptable to generify the error message a bit? I believe a less helpful message would be better than a misleading one. |
Hello,
The method TwitchLib.Api.Core.HttpCallHandlers.TwitchHttpClient.HandleWebException throw a BadTokenException when the api return 403.
But in some case, the returned message from the api is :
{
"error": "Forbidden",
"status": 403,
"message": "channel points are not available for the broadcaster"
}
But TwitchHttpClient will hide this information and return a bad token message.
I tested this issue with my account (new twitch account) and called "Helix.ChannelPoints.GetCustomReward".
I searched for a long time before realizing that my token was correct, but the problem was that my channel did not support the functionality.
The text was updated successfully, but these errors were encountered: