Prisma errors can't be handled on client

This commit is contained in:
zomars committed 2022-06-13 10:37:42 -06:00
1 parent b044c6fb70
commit e0a391d46e
1 file changed
-5
-5
View File
@@ -1,9 +1,4 @@
import { PrismaClientKnownRequestError } from "@prisma/client/runtime";
export function getErrorFromUnknown(cause: unknown): Error & { statusCode?: number; code?: string } {
if (cause instanceof PrismaClientKnownRequestError) {
return cause;
}
if (cause instanceof Error) {
return cause;
}