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

Function formatUnknownMessage

apps/cli/src/main.ts:1523–1531  ·  view source on GitHub ↗
(cause: unknown)

Source from the content-addressed store, hash-verified

1521 );
1522
1523const formatUnknownMessage = (cause: unknown): string => {
1524 if (cause instanceof Error) return cause.message;
1525 if (typeof cause === "string") return cause;
1526 if (typeof cause === "object" && cause !== null && "message" in cause) {
1527 const message = cause.message;
1528 if (typeof message === "string") return message;
1529 }
1530 return String(cause);
1531};
1532
1533const readCliLogLevel = (argv: ReadonlyArray<string>): string | undefined => {
1534 for (let index = 0; index < argv.length; index += 1) {

Callers 1

renderCliErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected