prismock
prismock copied to clipboard
[Feature request] raise PrismaClientKnownRequestError exceptions
When searching for an object that doesn't exist
await prisma.myModel.findUniqueOrThrow({
where: {
id: "does not exist",
},
});
The error raised by prismock
is an Error
. Could be great if this was a PrismaClientKnownRequestError
with a P2025
code.
I am using prismock@^1.33.1
. You can find a repo to reproduce here
Thanks anyway for the great job