Found while adding the create-database-table MCP tool (#8633).
The create-table handler is wrapped in if (request.body.name && request.body.columns) with no else, and the route schema declares no required fields, so invalid input is neither rejected nor answered.
Steps to reproduce
POST /api/v1/teams/:teamId/databases/:databaseId/tables with { "name": "orders" } (no columns). The request hangs with no response.
- Same with
{ "name": "", "columns": [ ... ] }. Also hangs.
POST with { "name": "orders", "columns": [] }. Returns 201 and creates a column-less table.
Expected
A 400 for a missing name or columns, and for an empty columns array.
Reference
forge/ee/routes/tables/index.js:273-279 (schema, no required), :299 (guard, no else).
Found while adding the create-database-table MCP tool (#8633).
The create-table handler is wrapped in
if (request.body.name && request.body.columns)with noelse, and the route schema declares norequiredfields, so invalid input is neither rejected nor answered.Steps to reproduce
POST /api/v1/teams/:teamId/databases/:databaseId/tableswith{ "name": "orders" }(nocolumns). The request hangs with no response.{ "name": "", "columns": [ ... ] }. Also hangs.POSTwith{ "name": "orders", "columns": [] }. Returns 201 and creates a column-less table.Expected
A 400 for a missing
nameorcolumns, and for an emptycolumnsarray.Reference
forge/ee/routes/tables/index.js:273-279(schema, norequired),:299(guard, noelse).