diff --git a/src/lib/cdp.js b/src/lib/cdp.js index a4975fc..358b92b 100644 --- a/src/lib/cdp.js +++ b/src/lib/cdp.js @@ -44,6 +44,8 @@ export default async ({ pipe: { pipeWrite, pipeRead } = {}, port }) => { onReply[id] = msg => res(msg); }); + if (reply.error) return new Error(reply.error.message); + return reply.result; };