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

Function multipartErrorResponse

apps/sim/app/api/table/utils.ts:114–121  ·  view source on GitHub ↗
(error: MultipartError)

Source from the content-addressed store, hash-verified

112
113/** Maps a {@link MultipartError} from the streaming CSV parser to its HTTP response. */
114export function multipartErrorResponse(error: MultipartError): NextResponse {
115 if (error.code === 'FILE_TOO_LARGE') {
116 return NextResponse.json({ error: 'CSV import file exceeds maximum size' }, { status: 413 })
117 }
118 const message =
119 error.code === 'NO_FILE' ? 'CSV file is required' : `Invalid CSV upload: ${error.message}`
120 return NextResponse.json({ error: message }, { status: 400 })
121}
122
123interface TableAccessResult {
124 hasAccess: true

Callers 2

route.tsFile · 0.90
route.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected