diff --git a/content/200-orm/500-reference/050-prisma-client-reference.mdx b/content/200-orm/500-reference/050-prisma-client-reference.mdx index d02bc906df..88298524c0 100644 --- a/content/200-orm/500-reference/050-prisma-client-reference.mdx +++ b/content/200-orm/500-reference/050-prisma-client-reference.mdx @@ -627,9 +627,7 @@ We introduced `findUniqueOrThrow` in v4.0.0. It replaces the [`rejectOnNotFound` ::: -`findUniqueOrThrow` retrieves a single data record similarly to [`findUnique()`](#findunique). However, if no record is found, it throws a `NotFoundError` with a message like: `No found`. - -Here’s an example of how it works: +`findUniqueOrThrow` retrieves a single data record similarly to [`findUnique()`](#findunique). However, if no record is found, it throws a `NotFoundError` with a message like: `No found`. Here’s an example of its usage: ```ts await prisma.user.findUniqueOrThrow({ @@ -637,6 +635,7 @@ await prisma.user.findUniqueOrThrow({ id: 1, }, }); +``` `findUniqueOrThrow` differs from `findUnique()` as follows: