Skip to content

Commit 5481c5e

Browse files
committed
test: test without closed error handling
1 parent f415c3e commit 5481c5e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/browser.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ export async function launch(options: McpLaunchOptions): Promise<Browser> {
120120
userDataDir,
121121
pipe: true,
122122
headless,
123+
dumpio: true,
123124
args,
124125
acceptInsecureCerts: options.acceptInsecureCerts,
125126
handleDevToolsAsPage: options.devtools,
@@ -142,9 +143,7 @@ export async function launch(options: McpLaunchOptions): Promise<Browser> {
142143
} catch (error) {
143144
if (
144145
userDataDir &&
145-
((error as Error).message.includes('The browser is already running') ||
146-
(error as Error).message.includes('Target closed') ||
147-
(error as Error).message.includes('Connection closed'))
146+
(error as Error).message.includes('The browser is already running')
148147
) {
149148
throw new Error(
150149
`The browser is already running for ${userDataDir}. Use --isolated to run multiple browser instances.`,

0 commit comments

Comments
 (0)