Skip to content

FF Tables: create-table endpoint hangs on a partial body and accepts invalid input #8640

Description

@andypalmi

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

  1. POST /api/v1/teams/:teamId/databases/:databaseId/tables with { "name": "orders" } (no columns). The request hangs with no response.
  2. Same with { "name": "", "columns": [ ... ] }. Also hangs.
  3. 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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

needs-triageNeeds looking at to decide what to dotype:bugSomething isn't working

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions