Skip to content

feat: add ConfigurationError class for network/connection issues #373

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 2 commits into from
Jul 10, 2025

Conversation

dcramer
Copy link
Member

@dcramer dcramer commented Jul 10, 2025

Introduces a new ConfigurationError class to distinguish between user input errors and system configuration issues. This improves error handling by:

  • Creating ConfigurationError class that extends Error with cause support
  • Treating DNS resolution failures (ENOTFOUND, EAI_AGAIN) as configuration errors
  • Treating connection errors (ECONNREFUSED, ETIMEDOUT) as configuration errors
  • Preventing these configuration errors from being sent to Sentry
  • Providing clear, user-friendly error messages for configuration issues
  • Adding proper TypeScript type predicates for all error type guards

This ensures that when users provide invalid Sentry hosts or have network configuration issues, they receive helpful error messages without polluting Sentry with expected configuration errors.

🤖 Generated with Claude Code

Introduces a new ConfigurationError class to distinguish between user input
errors and system configuration issues. This improves error handling by:

- Creating ConfigurationError class that extends Error with cause support
- Treating DNS resolution failures (ENOTFOUND, EAI_AGAIN) as configuration errors
- Treating connection errors (ECONNREFUSED, ETIMEDOUT) as configuration errors
- Preventing these configuration errors from being sent to Sentry
- Providing clear, user-friendly error messages for configuration issues
- Adding proper TypeScript type predicates for all error type guards

This ensures that when users provide invalid Sentry hosts or have network
configuration issues, they receive helpful error messages without polluting
Sentry with expected configuration errors.

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

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

codecov bot commented Jul 10, 2025

Codecov Report

Attention: Patch coverage is 52.94118% with 16 lines in your changes missing coverage. Please review.

Project coverage is 62.65%. Comparing base (c94e2a0) to head (dc3b7d9).
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/server.ts 0.00% 16 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #373   +/-   ##
=======================================
  Coverage   62.65%   62.65%           
=======================================
  Files          77       77           
  Lines        6855     6880   +25     
  Branches      613      620    +7     
=======================================
+ Hits         4295     4311   +16     
- Misses       2560     2569    +9     
Flag Coverage Δ
unittests 62.65% <52.94%> (+<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.

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
@dcramer dcramer merged commit e742b90 into main Jul 10, 2025
13 checks passed
@dcramer dcramer deleted the improve-host-errors branch July 10, 2025 19:55
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