MCPcopy Create free account
hub / github.com/cortexkit/magic-context / asError

Function asError

packages/plugin/scripts/longmemeval/runner.ts:52–55  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

50}
51
52function asError(error: unknown): Error {
53 if (error instanceof Error) return error;
54 return new Error(typeof error === "string" ? error : JSON.stringify(error));
55}
56
57function logLine(message: string): void {
58 console.log(`[${new Date().toISOString()}] ${message}`);

Callers 8

appendLineFunction · 0.70
loadResultsMapFunction · 0.70
loadStateFunction · 0.70
withRetryFunction · 0.70
updateErrorStateFunction · 0.70
cleanupSessionsFunction · 0.70
workerFunction · 0.70
runner.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected