Put errors back how they were.
This commit is contained in:
parent
3e4e60a12d
commit
22d6b95101
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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 })
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue