fix(client-engine-runtime): make DataMapperError a UserFacingError#28846
Merged
fix(client-engine-runtime): make DataMapperError a UserFacingError#28846
DataMapperError a UserFacingError#28846Conversation
Make `DataMapperError` a `UserFacingError` with code 2006 so that it's correctly caught and converted to `PrismaClientKnownRequestError` in Prisma Client, and so that it is properly handled by the query plan executor server and returned as HTTP 400 and not HTTP 500. Closes: https://linear.app/prisma-company/issue/TML-1664/fix-incorrect-500-error-returned-from-qpe-instead-of-400
Contributor
WalkthroughDataMapperError now extends Changes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used📓 Path-based instructions (1)**/*.ts📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (10)📚 Learning: 2025-12-03T09:46:36.091ZApplied to files:
📚 Learning: 2025-12-04T16:42:41.033ZApplied to files:
📚 Learning: 2025-12-03T09:46:36.091ZApplied to files:
📚 Learning: 2025-12-03T09:46:36.091ZApplied to files:
📚 Learning: 2025-12-03T09:46:36.091ZApplied to files:
📚 Learning: 2025-12-03T09:46:36.091ZApplied to files:
📚 Learning: 2025-12-03T09:46:36.091ZApplied to files:
📚 Learning: 2025-12-03T09:46:36.091ZApplied to files:
📚 Learning: 2025-12-03T09:46:36.091ZApplied to files:
📚 Learning: 2025-12-03T09:46:36.091ZApplied to files:
🧬 Code graph analysis (3)packages/client/tests/functional/issues/TML-1664-unknown-enum-value-read-error/_matrix.ts (1)
packages/client/tests/functional/issues/TML-1664-unknown-enum-value-read-error/prisma/_schema.ts (1)
packages/client/tests/functional/issues/TML-1664-unknown-enum-value-read-error/test.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1000)
Comment |
Contributor
size-limit report 📦
|
aqrln
commented
Dec 4, 2025
packages/client/tests/functional/issues/TML-1664-unknown-enum-value-read-error/test.ts
Show resolved
Hide resolved
packages/client/tests/functional/issues/TML-1664-unknown-enum-value-read-error/test.ts
Show resolved
Hide resolved
ae0dd9c to
eef618a
Compare
Contributor
|
Client memory tests, node 24, client: |
jacek-prisma
approved these changes
Dec 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make
DataMapperErroraUserFacingErrorwith code P2023 so that it's correctly caught and converted toPrismaClientKnownRequestErrorin Prisma Client, and so that it is properly handled by the query plan executor server and returned as HTTP 400 and not HTTP 500.Ref: https://linear.app/prisma-company/issue/TML-1664/fix-incorrect-500-error-returned-from-qpe-instead-of-400
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.