Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/browser/errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ describe('classifyBrowserError', () => {
'CDP connection reset',
'Daemon command failed',
'No window with id: 123',
'Detached while handling command id=cmd_42',
'No tab with id: 456',
'Debugger is not attached to the tab',
]) {
const advice = classifyBrowserError(new Error(msg));
expect(advice.kind, `expected "${msg}" → extension-transient`).toBe('extension-transient');
Expand Down
8 changes: 8 additions & 0 deletions src/browser/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ const EXTENSION_TRANSIENT_PATTERNS = [
'CDP connection',
'Daemon command failed',
'No window with id',
// CDP debugger detach race — daemon detaches a command while still serving
// it under concurrent load. Already treated as transient in the e2e
// test harness (tests/e2e/browser-public.test.ts isTransientBrowserDetach),
// but classifyBrowserError did not list it, so CLI runtime would surface
// it as a hard 500 to callers instead of retrying.
'Detached while handling command',
'No tab with id',
'Debugger is not attached to the tab',
] as const;

/**
Expand Down
Loading