cdp: return protocol errors

This commit is contained in:
CanadaHonk 2023-01-02 11:20:34 +00:00
parent 8ac51dffa7
commit 04ff8d8d40

View File

@ -44,6 +44,8 @@ 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);
return reply.result; return reply.result;
}; };