NotFoundError not exported #14209
Labels
bug/1-unconfirmed
Bug should have enough information for reproduction, but confirmation has not happened yet.
kind/bug
A reported bug.
team/client
Issue for team Client.
Bug description
When user uses
rejectOnNotFound
orfindFirstOrThrow
/findUniqueOrThrow
, there is no way how to catch this exception specifically. Because Prisma doesn't exportNotFoundError
, user can't useinstance
operator and therefore can decide only based on the error message.I believe the
NotFoundError
should be exported and therefore I set this up as a bug.How to reproduce
Run
prisma generate
and inspect the generated file.Expected behavior
There is
NotFoundError
exported, so the user can decide using checkerror instanceof Prisma.NotFoundError
.Prisma information
No schema or queries are neccessary.
Environment & setup
Is environment agnostic.
Prisma Version
I tried prisma clients in versions
3.13.0
,3.15.2
and4.0.0
.The text was updated successfully, but these errors were encountered: