Fix: check command hangs indefinitely (#272)

Fixes #257
This commit is contained in:
Chris Tate
2026-01-25 23:58:53 -06:00
committed by GitHub
parent 45506fbff0
commit a99f59cd20
3 changed files with 10 additions and 0 deletions
+8
View File
@@ -177,6 +177,14 @@ export function toAIFriendlyError(error: unknown, selector: string): Error {
);
}
// Handle general timeout (element exists but action couldn't complete)
if (message.includes('Timeout') && message.includes('exceeded')) {
return new Error(
`Action on "${selector}" timed out. The element may be blocked, still loading, or not interactable. ` +
`Run 'snapshot' to check the current page state.`
);
}
// Handle element not found (timeout waiting for element)
if (
message.includes('waiting for') &&