From 3d4bd9c4e3c915bd84cf567834b5099ce55d17a6 Mon Sep 17 00:00:00 2001 From: soulgalore Date: Wed, 20 Mar 2024 09:17:33 +0100 Subject: [PATCH] Check the return of Bidi send --- lib/firefox/firefoxBidi.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/firefox/firefoxBidi.js b/lib/firefox/firefoxBidi.js index a24f13814..019faf273 100644 --- a/lib/firefox/firefoxBidi.js +++ b/lib/firefox/firefoxBidi.js @@ -20,7 +20,10 @@ export class FirefoxBidi { }; try { - await this.bidi.send(params); + const result = await this.bidi.send(params); + if (result.type != 'success') { + log.error(result); + } } catch (error) { log.error('Could not inject JavaScript:' + error); } @@ -55,7 +58,10 @@ export class FirefoxBidi { } } }; - await bidi.send(continueWithAuth); + const result = await bidi.send(continueWithAuth); + if (result.type != 'success') { + log.error(result); + } } }); } @@ -82,7 +88,10 @@ export class FirefoxBidi { } }; try { - await this.bidi.send(params); + const result = await this.bidi.send(params); + if (result.type != 'success') { + log.error(result); + } } catch (error) { log.error('Could not set cookie:' + error); }