Skip to content

Silence expected Prisma request errors - #1374

Closed
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/out-3945-cursor-automated-triage-response-7fd6
Closed

Silence expected Prisma request errors#1374
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/out-3945-cursor-automated-triage-response-7fd6

Conversation

@cursor

@cursor cursor Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Stop emitting console output for expected Prisma request errors that are already mapped to 404 responses (P2025, malformed UUID P2023, raw-query UUID P2010/22P02).
  • Keep existing console.error behavior for unclassified Prisma known-request errors and unexpected errors.
  • Update focused error-handler tests to assert expected Prisma request errors are handled without logging.

Testing Criteria

  • yarn test src/app/api/tests/utils/withErrorHandler.test.ts --runInBand — focused suite passes; covers mapped Prisma 404 cases and unclassified Prisma logging.
  • yarn prettier:check — passes.
  • yarn lint:check — passes with existing React hook/compiler warnings.
  • yarn tsc — blocked by pre-existing missing SVG module declarations in src/icons/index.ts, unrelated to this change.

Notes

  • Linear MCP returned 401 and Sentry MCP required auth, so direct Sentry event metadata was unavailable. The visible issue title is Prisma/Sentry-shaped and the likely regression was recent console.warn(error) output for mapped Prisma request errors.

Impact & Surface Area of Change

  • Scoped to API error handling for expected Prisma request errors. User-facing behavior remains the same 404 response; only console/Sentry noise for already-mapped expected cases is removed.
Open in Web View Automation 

Co-authored-by: Neil Raina <makeitraina@users.noreply.github.com>
@linear-code

linear-code Bot commented Jul 3, 2026

Copy link
Copy Markdown

OUT-3945

@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tasks-app Ready Ready Preview, Comment Jul 3, 2026 7:49pm

Request Review

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.

2 participants