Commit 3784f54
authored
fix(table): return 400 instead of 500 on empty batch insert (#4329)
The POST /api/table/[tableId]/rows handler called handleBatchInsert
without await, so ZodError rejections (e.g. empty rows array) bypassed
the route's try/catch and were caught by withRouteHandler as an
unhandled error, returning a generic 500 "Internal server error". Add
await so validation errors surface as 400s with the actual message.1 parent 9ac73bb commit 3784f54
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| |||
0 commit comments