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

Function rowWriteErrorResponse

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

Source from the content-addressed store, hash-verified

78 * unrecognized and the caller should log it and return its generic 500.
79 */
80export function rowWriteErrorResponse(error: unknown): NextResponse | null {
81 const message = rootErrorMessage(error)
82
83 if (ROW_WRITE_ERROR_PATTERNS.some((p) => message.includes(p)) || /^Row .+?:/.test(message)) {
84 return NextResponse.json({ error: message }, { status: 400 })
85 }
86
87 return null
88}
89
90/**
91 * Next.js buffers the request body for the proxy and silently truncates it past this

Callers 8

utils.test.tsFile · 0.90
handleBatchInsertFunction · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
handleBatchInsertFunction · 0.90
route.tsFile · 0.90

Calls 2

rootErrorMessageFunction · 0.85
testMethod · 0.80

Tested by

no test coverage detected