Skip to content

Commit

Permalink
Merge pull request #807 from gemini-testing/HERMIONE-1261.unh_rej_v7
Browse files Browse the repository at this point in the history
fix: ignore puppeteer ProtocolError in workers (backport to v7)
  • Loading branch information
KuznetsovRoman authored Nov 19, 2023
2 parents 21666a8 + cce174b commit 40b2917
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/utils/processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

const _ = require("lodash");
const { WORKER_UNHANDLED_REJECTION } = require("../constants/process-messages");
const logger = require("./logger");
const ipc = require("./ipc");

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

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

0 comments on commit 40b2917

Please sign in to comment.