Python does this, presumably as a workaround:
private async handleWebUSBError(
e: any,
userAction: ConnectionAction,
finalFocusRef: FinalFocusRef
) {
if (e instanceof DeviceError) {
this.device.dispatchTypedEvent(
"afterrequestdevice",
new AfterRequestDevice()
);
We should switch to try/finally in the connection library and remove this workaround on debug.
Check for the same bug in the bluetooth code.