refactor: deepen query failure classification module

This commit is contained in:
Tom Boucher
2026-05-04 19:54:29 -04:00
parent 9f5b011b35
commit ba6100c548
7 changed files with 64 additions and 20 deletions

View File

@@ -1,5 +1,6 @@
import { GSDError, exitCodeFor } from './errors.js';
import { GSDToolsError } from './gsd-tools-error.js';
import { errorMessage } from './query-failure-classification.js';
/**
* Module owning projection of internal errors to GSDToolsError contract.
@@ -16,7 +17,7 @@ export function toGSDToolsError(command: string, args: string[], err: unknown):
);
}
const msg = err instanceof Error ? err.message : String(err);
const msg = errorMessage(err);
return new GSDToolsError(
msg,
command,