(command: string, err: unknown)
| 343 | // command failures are diagnosable. Enqueues synchronously — the process `exit` |
| 344 | // handler flushes it. Drop this into any command's failure path. |
| 345 | export function trackCommandFailure(command: string, err: unknown): void { |
| 346 | const error = err instanceof Error ? err : new Error(String(err)); |
| 347 | trackCliError({ |
| 348 | error_name: error.name, |
| 349 | error_message: error.message, |
| 350 | stack_trace: error.stack, |
| 351 | command, |
| 352 | kind: "command_error", |
| 353 | }); |
| 354 | } |
| 355 | |
| 356 | // Whisper being absent/uninstallable is an environment prerequisite gap, not a |
| 357 | // command crash — track it on its own low-severity metric instead of cli_error |
no test coverage detected