From 5983c72275a2f60d0c2cd0e3a025ba02ed58f440 Mon Sep 17 00:00:00 2001 From: Ankur Datta <64993082+ankur-arch@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:56:12 +0600 Subject: [PATCH] Update 050-prisma-client-reference.mdx --- .../200-orm/500-reference/050-prisma-client-reference.mdx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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: