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

Function tableFilterError

apps/sim/app/api/table/utils.ts:21–35  ·  view source on GitHub ↗
(
  filter: Filter | undefined,
  columns: ColumnDefinition[]
)

Source from the content-addressed store, hash-verified

19 * (`delete-async`, `columns/run`) so a bad field fails fast with a clear message.
20 */
21export function tableFilterError(
22 filter: Filter | undefined,
23 columns: ColumnDefinition[]
24): NextResponse | null {
25 if (!filter) return null
26 try {
27 buildFilterClause(filter, USER_TABLE_ROWS_SQL_NAME, columns)
28 return null
29 } catch (error) {
30 if (error instanceof TableQueryValidationError) {
31 return NextResponse.json({ error: error.message }, { status: 400 })
32 }
33 throw error
34 }
35}
36
37const logger = createLogger('TableUtils')
38

Callers 3

route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90

Calls 1

buildFilterClauseFunction · 0.90

Tested by

no test coverage detected