Prisma errors can't be handled on client
This commit is contained in:
1 parent
b044c6fb70
commit
e0a391d46e
1 file changed
-5
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user