Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore: fix error message detection in webmcp (#43121)

Dmitry Gozman487fd556d138
diff --git a/packages/injected/src/webMCP.ts b/packages/injected/src/webMCP.ts
index 5608a10d94..517507ce5c 100644
--- a/packages/injected/src/webMCP.ts
+++ b/packages/injected/src/webMCP.ts
@@ -72,7 +72,7 @@ export class WebMCPScript {
return await modelContext.executeTool!(tool, input);
} catch (e) {
// Chromium before 155 takes the input as a JSON string.
- if (!String((e as Error)?.message).includes('Failed to parse input arguments'))
+ if (!String((e as Error)?.message).includes('Failed to parse input'))
throw e;
return await modelContext.executeTool!(tool, JSON.stringify(input));
}