MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / extractErrorStack

Function extractErrorStack

packages/node-runtime/src/ai/ai-logger.ts:145–151  ·  view source on GitHub ↗
(error: unknown, stackLines: number = 5)

Source from the content-addressed store, hash-verified

143}
144
145export function extractErrorStack(error: unknown, stackLines: number = 5): string | null {
146 if (error instanceof Error && error.stack) {
147 const lines = error.stack.split('\n')
148 return lines.slice(1, stackLines + 1).join('\n')
149 }
150 return null
151}

Callers 1

formatDataFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected