prismock icon indicating copy to clipboard operation
prismock copied to clipboard

[Feature request] raise PrismaClientKnownRequestError exceptions

Open paulsouche opened this issue 5 months ago • 0 comments

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

paulsouche avatar Sep 09 '24 13:09 paulsouche