Skip to content

Commit

Permalink
Merge pull request #776 from gemini-testing/HERMIONE-1056.unhandled_r…
Browse files Browse the repository at this point in the history
…ejection

fix: ignore ProtocolError unhandled rejections
  • Loading branch information
KuznetsovRoman authored Aug 2, 2023
2 parents e0e698f + bf80946 commit 21f0718
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ process.on("uncaughtException", err => {
});

process.on("unhandledRejection", (reason, p) => {
if (reason && reason.name === "ProtocolError") {
logger.warn(`Unhandled Rejection "${reason}" in hermione:master:${process.pid} was ignored`);
return;
}

const error = `Unhandled Rejection in hermione:master:${process.pid}:\nPromise: ${JSON.stringify(
p,
)}\nReason: ${reason}`;
Expand Down

0 comments on commit 21f0718

Please sign in to comment.