twitchdev / issues

Issue tracker for third party developers.
Apache License 2.0
73 stars 6 forks source link

Error 500 when a channel that can't do Bits transaction uses useBits #6

Open Breci opened 4 years ago

Breci commented 4 years ago

Brief description When a channel doesn't have Bits support (disabled, authorization not given, etc) and tries to use window.Twitch.ext.bits.useBits(sku) from the js helper, we get an error 500 as a response.

How to reproduce Create an extension with Bits products, add a channel that can use Bits on it, then remove the permission and try to useBits again

Expected behavior We should get an error 401 with an error message

Additional context or questions Extensions should not have this case by detecting if the bits are enabled or not. But it makes the debugging pretty hard because of the error 500, and error 500 isn't good on a prod server

mauerbac commented 4 years ago

EXT-1161