Skip to content

Commit

Permalink
Check the return of Bidi send (#2112)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore authored Mar 20, 2024
1 parent 590018d commit d2a9058
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions lib/firefox/firefoxBidi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -55,7 +58,10 @@ export class FirefoxBidi {
}
}
};
await bidi.send(continueWithAuth);
const result = await bidi.send(continueWithAuth);
if (result.type != 'success') {
log.error(result);
}
}
});
}
Expand All @@ -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);
}
Expand Down

0 comments on commit d2a9058

Please sign in to comment.