mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 01:23:52 +00:00
supress cryptic error message
This commit is contained in:
+8
-1
@@ -87,7 +87,14 @@ export function connect(): BLEThunkAction {
|
||||
});
|
||||
} catch (err) {
|
||||
// this can happen if the use cancels the dialog
|
||||
console.log(err);
|
||||
if (
|
||||
err instanceof DOMException &&
|
||||
err.code === DOMException.NOT_FOUND_ERR
|
||||
) {
|
||||
console.debug('User cancelled connect');
|
||||
} else {
|
||||
console.error(err);
|
||||
}
|
||||
dispatch(endDisconnect());
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user