Skip to content

Commit 9b4cd8e

Browse files
chore: provide better Error message
1 parent 2714158 commit 9b4cd8e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cli.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ export const cliOptions = {
1515
'Connect to a running Chrome instance using port forwarding. For more details see: https://developer.chrome.com/docs/devtools/remote-debugging/local-server.',
1616
alias: 'u',
1717
coerce: (url: string) => {
18-
new URL(url);
18+
try {
19+
new URL(url);
20+
} catch {
21+
throw new Error(`Provided browserUrl ${url} is not valid URL.`);
22+
}
1923
return url;
2024
},
2125
},

0 commit comments

Comments
 (0)