Skip to content

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

Open
TheShnider wants to merge 1 commit into
MettaChain:mainfrom
TheShnider:fix/generate-report-prisma-error-handling
Open

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

Conversation

@TheShnider

Copy link
Copy Markdown

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

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

1 participant