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

Function renderCliError

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

Source from the content-addressed store, hash-verified

1603};
1604
1605const renderCliError = (cause: Cause.Cause<unknown>): string => {
1606 const squashed = Cause.squash(cause);
1607 const raw = formatUnknownMessage(squashed);
1608 const normalized = normalizeCliErrorText(raw);
1609 if (normalized.length === 0) return "Unknown error";
1610 if (normalized !== raw.trim()) {
1611 return `${normalized}\n(run with --log-level debug for full details)`;
1612 }
1613 return normalized;
1614};
1615
1616const parsePositiveIntegerOption = (name: string, raw: string): number => {
1617 if (!/^\d+$/.test(raw)) {

Callers 1

main.tsFile · 0.85

Calls 2

normalizeCliErrorTextFunction · 0.90
formatUnknownMessageFunction · 0.85

Tested by

no test coverage detected