fix: Capture non-error as error
This commit is contained in:
parent
82de234f21
commit
cd527f2bce
@ -37,6 +37,9 @@ if (dev) {
|
||||
export const prisma = new PrismaClient(prismaOptions);
|
||||
|
||||
export function PrismaErrorHandler(e) {
|
||||
if (e! instanceof Error) {
|
||||
e = new Error(e.toString());
|
||||
}
|
||||
sentry.captureException(e);
|
||||
const payload = {
|
||||
status: e.status || 500,
|
||||
|
Loading…
x
Reference in New Issue
Block a user