cdp: warn in console on CDP errors

This commit is contained in:
CanadaHonk 2023-01-07 17:07:42 +00:00
parent d6f268c5db
commit b249ced7f1

View File

@ -46,7 +46,10 @@ export default async ({ pipe: { pipeWrite, pipeRead } = {}, port }) => {
onReply[id] = msg => res(msg); onReply[id] = msg => res(msg);
}); });
if (reply.error) return new Error(reply.error.message); if (reply.error) {
log('warn: CDP reply error:', reply.error);
return new Error(reply.error.message);
}
return reply.result; return reply.result;
}; };