Skip to content

Suppress handled API client errors from server logs - #1350

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/OUT-3913-cursor-automated-triage-response-73a5
Draft

Suppress handled API client errors from server logs#1350
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/OUT-3913-cursor-automated-triage-response-73a5

Conversation

@cursor

@cursor cursor Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Suppress console.error logging for normalized handled 4xx API errors in withErrorHandler, including Copilot SDK-style ApiError: Not Found responses.
  • Preserve logging for 5xx/unexpected server errors.
  • Extend focused tests for APIError, Zod validation, Copilot-style errors, server-error logging, and successful responses.

Testing Criteria

  • yarn test src/app/api/tests/utils/withErrorHandler.test.ts --runInBand (6 tests passed)
  • yarn lint:check (passed with existing warnings)

Notes

  • Linear MCP returned auth_revoked and Sentry MCP requires authentication, so direct Sentry event details and ticket commenting may be unavailable from this automation session.

Impact & Surface Area of Change

  • API route error handling only. Handled 4xx responses keep their existing JSON/status behavior but should no longer create Sentry noise through server console.error; 5xx responses still log for observability.
Open in Web View Automation 

@vercel

vercel Bot commented Jun 25, 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 Jun 25, 2026 6:00pm

Request Review

@linear-code

linear-code Bot commented Jun 25, 2026

Copy link
Copy Markdown

OUT-3913

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.

1 participant