With isBitsEnabled
reporting true
, on invoking useBits
our extension can get One or more GraphQL errors were detected on request 01HCYS808TQ4M1F8N58JH305HJ. IsEligible: service error
. This leaves the Twitch UI panel where the purchase UI would be open but empty. The onTransactionCancelled
callback is not fired.
This appears to be a Twitch internal error, it leaves the Twitch managed UI in a bad state and doesn’t allow our extension code to clean up. Also try-catch
around useBits
doesn’t catch this, but from logging that’s definitely where it’s failing from our code.
It seems this happens when the purchaser is the same account as the broadcaster (i.e. circular spending), but the error has not happened at least once in that scenario.
I can put in a check for viewer and broadcaster being the same before calling useBits
, but I’d appreciate knowing whether this is expected behaviour or not, whether there are other circumstances that might fail in this way, and what the recommended handling for errors would be.