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

Function rootErrorMessage

apps/sim/app/api/table/utils.ts:44–50  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

42 * classification must look at the root cause.
43 */
44export function rootErrorMessage(error: unknown): string {
45 let current: unknown = error
46 while (current instanceof Error && current.cause instanceof Error) {
47 current = current.cause
48 }
49 return toError(current).message
50}
51
52/**
53 * Known user-facing row-write failures (service validation + the best-effort

Callers 4

utils.test.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
rowWriteErrorResponseFunction · 0.85

Calls 1

toErrorFunction · 0.90

Tested by

no test coverage detected