Put errors back how they were.

This commit is contained in:
Sam Rose 2024-11-28 15:39:16 +00:00
parent 3e4e60a12d
commit 22d6b95101
No known key found for this signature in database
2 changed files with 2 additions and 3 deletions

View File

@ -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)
}

View File

@ -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 })
}
}