diff --git a/packages/server/src/api/controllers/table/external.ts b/packages/server/src/api/controllers/table/external.ts index 5e77dc1dc6..6f09bf4a61 100644 --- a/packages/server/src/api/controllers/table/external.ts +++ b/packages/server/src/api/controllers/table/external.ts @@ -54,7 +54,7 @@ export async function updateTable( return table } catch (err: any) { if (err instanceof Error) { - throw err + ctx.throw(400, err.message) } else { ctx.throw(err.status || 500, err?.message || err) } diff --git a/packages/server/src/sdk/app/rows/search/internal/sqs.ts b/packages/server/src/sdk/app/rows/search/internal/sqs.ts index ba5614edca..9bfa0ecd27 100644 --- a/packages/server/src/sdk/app/rows/search/internal/sqs.ts +++ b/packages/server/src/sdk/app/rows/search/internal/sqs.ts @@ -485,7 +485,6 @@ export async function search( if (err.status === 400 && msg?.match(MISSING_COLUMN_REGEX)) { return { rows: [] } } - // throw new Error(`Unable to search by SQL - ${msg}`, { cause: err }) - throw err + throw new Error(`Unable to search by SQL - ${msg}`, { cause: err }) } }