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
|
return table
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
if (err instanceof Error) {
|
if (err instanceof Error) {
|
||||||
throw err
|
ctx.throw(400, err.message)
|
||||||
} else {
|
} else {
|
||||||
ctx.throw(err.status || 500, err?.message || err)
|
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)) {
|
if (err.status === 400 && msg?.match(MISSING_COLUMN_REGEX)) {
|
||||||
return { rows: [] }
|
return { rows: [] }
|
||||||
}
|
}
|
||||||
// throw new Error(`Unable to search by SQL - ${msg}`, { cause: err })
|
throw new Error(`Unable to search by SQL - ${msg}`, { cause: err })
|
||||||
throw err
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue