MCPcopy Index your code
hub / github.com/simstudioai/sim / asString

Function asString

packages/utils/src/errors.ts:80–81  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

78
79 const deepest = chain[chain.length - 1] as Error & Record<string, unknown>
80 const asString = (value: unknown): string | undefined =>
81 typeof value === 'string' ? value : undefined
82 const code = asString(deepest.code)
83 const errno = asString(deepest.errno)
84 const syscall = asString(deepest.syscall)

Callers 1

describeErrorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected