Skip to content

fix: remap Prisma errors to NestJS exceptions in generateReport#825

Merged
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
TheShnider:fix/generate-report-prisma-error-handling
Jun 28, 2026
Merged

fix: remap Prisma errors to NestJS exceptions in generateReport#825
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
TheShnider:fix/generate-report-prisma-error-handling

Conversation

@TheShnider

Copy link
Copy Markdown
Contributor

Closes #690

  • Replace raw error.message string matching on 'not found' which could leak internal Prisma error details to callers
  • Re-throw existing NestJS HTTP exceptions untouched
  • Remap Prisma P2025 / NotFoundError to NotFoundException with a safe redacted message
  • Map all other errors to InternalServerErrorException with a generic message

- Replace raw error.message string matching on 'not found' which could
  leak internal Prisma error details to callers
- Re-throw existing NestJS HTTP exceptions untouched
- Remap Prisma P2025 / NotFoundError to NotFoundException with a safe redacted message
- Map all other errors to InternalServerErrorException with a generic message
@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@TheShnider Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@nanaf6203-bit nanaf6203-bit merged commit 59a3f4c into MettaChain:main Jun 28, 2026
5 checks passed

Copy link
Copy Markdown
Contributor

✅ LGTM \u2014 nice work, thanks for the fix! 🚢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

generateReport leaks raw Prisma error messages to API responses

2 participants