Skip to content

Commit 7071f46

Browse files
authored
fix: update error handling in Prisma Client API reference to use PrismaClientKnownRequestError (#7160)
1 parent 54544c2 commit 7071f46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/200-orm/500-reference/050-prisma-client-reference.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ prisma:query COMMIT
929929
| -------------------------- | ------------------------------ | --------------------------------------------------------------- |
930930
| JavaScript object (typed) | `User` | |
931931
| JavaScript object (plain) | `{ name: "Alice Wonderland" }` | Use `select` and `include` to determine which fields to return. |
932-
| `RecordNotFound` exception | | Exception is thrown if record does not exist. |
932+
| `PrismaClientKnownRequestError` (code `P2025`) | | Thrown if the record to update does not exist. See [Error reference](/orm/reference/error-reference#p2025) |
933933

934934
#### Remarks
935935

@@ -1184,7 +1184,7 @@ To delete records that match a certain criteria, use [`deleteMany`](#deletemany)
11841184
| -------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------- |
11851185
| JavaScript object (typed) | `User` | The `User` record that was deleted. |
11861186
| JavaScript object (plain) | `{ name: "Alice Wonderland" }` | Data from the `User` record that was deleted. Use `select` and `include` to determine which fields to return. |
1187-
| `RecordNotFound` exception | | Throws an exception if record does not exist. |
1187+
| `PrismaClientKnownRequestError` (code `P2025`) | | Thrown if the record to delete does not exist. See [Error reference](/orm/reference/error-reference#p2025) | |
11881188

11891189
#### Remarks
11901190

0 commit comments

Comments
 (0)