Skip to content

Commit 3fccf05

Browse files
committed
fix: use fail() for connection error handling
1 parent 74f3d5d commit 3fccf05

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

packages/cli/src/cli/main.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -959,8 +959,7 @@ export function createProgram(): Command {
959959
// Detect "Connection X not found" pattern
960960
const connMatch = errMsg.match(/[Cc]onnection\s+([0-9a-f-]{36})\s+not\s+found/);
961961
if (!connMatch) {
962-
console.error(`Error: ${errMsg}`);
963-
process.exit(1);
962+
fail("request_failed", errMsg);
964963
}
965964

966965
const missingConnId = connMatch[1];

0 commit comments

Comments
 (0)