MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / trackCliError

Function trackCliError

packages/cli/src/telemetry/events.ts:320–339  ·  view source on GitHub ↗
(props: {
  error_name: string;
  error_message: string;
  stack_trace?: string;
  command?: string;
  kind: "uncaught_exception" | "unhandled_rejection" | "command_error";
})

Source from the content-addressed store, hash-verified

318}
319
320export function trackCliError(props: {
321 error_name: string;
322 error_message: string;
323 stack_trace?: string;
324 command?: string;
325 kind: "uncaught_exception" | "unhandled_rejection" | "command_error";
326}): void {
327 trackEvent("cli_error", {
328 error_name: props.error_name,
329 // Redact before truncating — CLI messages and stack traces carry absolute
330 // install paths (/Users/...), cache dirs, and user-supplied args. Same
331 // redaction the render_* events already apply.
332 error_message: redactTelemetryMessage(props.error_message).slice(0, 1000),
333 stack_trace: props.stack_trace
334 ? redactTelemetryMessage(props.stack_trace).slice(0, 2000)
335 : undefined,
336 command: props.command,
337 kind: props.kind,
338 });
339}
340
341// Report why a command failed before it exits non-zero. cli_command_result
342// records the failure but not the reason; this fills that gap via cli_error so

Callers 2

events.test.tsFile · 0.85
trackCommandFailureFunction · 0.85

Calls 2

redactTelemetryMessageFunction · 0.85
trackEventFunction · 0.70

Tested by

no test coverage detected