MCPcopy Index your code
hub / github.com/coder/mux / formatUnknown

Function formatUnknown

src/node/orpc/formatOrpcError.ts:292–298  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

290}
291
292function formatUnknown(value: unknown): string {
293 if (value instanceof Error) {
294 return value.stack ?? `${value.name}: ${value.message}`;
295 }
296
297 return inspect(value, { depth: 5, maxArrayLength: 50, breakLength: 120 });
298}
299
300export function formatOrpcError(error: unknown, interceptorOptions?: unknown): FormattedOrpcError {
301 try {

Callers 1

formatOrpcErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected