Skip to content

fix: convert validation errors to UserInputError for better handling #369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2025

Conversation

dcramer
Copy link
Member

@dcramer dcramer commented Jul 9, 2025

Convert generic Error throws to UserInputError in issue parameter validation to prevent unnecessary Sentry logging and provide clearer user feedback.

This addresses multiple Sentry issues by properly categorizing user input validation errors:

  • Organization slug validation (Fixes MCP-SERVER-E2A, MCP-SERVER-E7Z, MCP-SERVER-DYJ)
  • Issue ID format validation (Fixes MCP-SERVER-E7F, MCP-SERVER-E8E, MCP-SERVER-E6E, MCP-SERVER-E7B, MCP-SERVER-E9J)
  • Issue URL validation (Fixes MCP-SERVER-E8A, MCP-SERVER-E8M, MCP-SERVER-E02)

These validation errors will no longer be logged to Sentry, reducing noise while still providing helpful feedback to users.

🤖 Generated with Claude Code

Convert generic Error throws to UserInputError in issue parameter validation
to prevent unnecessary Sentry logging and provide clearer user feedback.

This addresses multiple Sentry issues by properly categorizing user input
validation errors:
- Organization slug validation (Fixes MCP-SERVER-E2A, MCP-SERVER-E7Z, MCP-SERVER-DYJ)
- Issue ID format validation (Fixes MCP-SERVER-E7F, MCP-SERVER-E8E, MCP-SERVER-E6E, MCP-SERVER-E7B, MCP-SERVER-E9J)
- Issue URL validation (Fixes MCP-SERVER-E8A, MCP-SERVER-E8M, MCP-SERVER-E02)

These validation errors will no longer be logged to Sentry, reducing noise
while still providing helpful feedback to users.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Copy link

codecov bot commented Jul 9, 2025

Codecov Report

Attention: Patch coverage is 65.00000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 62.40%. Comparing base (cde70e1) to head (b616503).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/mcp-server/src/internal/issue-helpers.ts 65.00% 7 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #369   +/-   ##
=======================================
  Coverage   62.40%   62.40%           
=======================================
  Files          77       77           
  Lines        6817     6828   +11     
  Branches      598      601    +3     
=======================================
+ Hits         4254     4261    +7     
- Misses       2563     2567    +4     
Flag Coverage Δ
unittests 62.40% <65.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dcramer dcramer merged commit cef8b2b into main Jul 9, 2025
13 checks passed
@dcramer dcramer deleted the feat/improve-errors branch July 9, 2025 21:39
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