MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / renderCliError

Function renderCliError

apps/cli/src/main.ts:1583–1592  ·  view source on GitHub ↗
(cause: Cause.Cause<unknown>)

Source from the content-addressed store, hash-verified

1581};
1582
1583const renderCliError = (cause: Cause.Cause<unknown>): string => {
1584 const squashed = Cause.squash(cause);
1585 const raw = formatUnknownMessage(squashed);
1586 const normalized = normalizeCliErrorText(raw);
1587 if (normalized.length === 0) return "Unknown error";
1588 if (normalized !== raw.trim()) {
1589 return `${normalized}\n(run with --log-level debug for full details)`;
1590 }
1591 return normalized;
1592};
1593
1594const parsePositiveIntegerOption = (name: string, raw: string): number => {
1595 if (!/^\d+$/.test(raw)) {

Callers 1

main.tsFile · 0.85

Calls 2

normalizeCliErrorTextFunction · 0.90
formatUnknownMessageFunction · 0.85

Tested by

no test coverage detected