Skip to content

Commit

Permalink
fix: ignore ProtocolError unhandled rejections
Browse files Browse the repository at this point in the history
  • Loading branch information
KuznetsovRoman committed Aug 2, 2023
1 parent 12f57f4 commit f0c1443
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 f0c1443

Please sign in to comment.