Skip to content

fix: refine errors for private maddr dial failures #98

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

2color
Copy link
Member

@2color 2color commented Jul 16, 2025

When connection gater blocks private addresses, provide clearer error messages
instead of showing detailed "gater disallows connection to peer" errors.

  • Add formatConnectionError function to detect and summarize private address failures
  • Show "all X addresses are private/local" when only private addresses are found
  • Show "no good addresses (X private addresses filtered out)" when mixed
  • Preserve original error messages for other connection failures
  • Add tests for error formatting scenarios

Fixes #96

When connection gater blocks private addresses, provide clearer error messages
instead of showing detailed "gater disallows connection to peer" errors.

- Add formatConnectionError function to detect and summarize private address failures
- Show "all X addresses are private/local" when only private addresses are found
- Show "no good addresses (X private addresses filtered out)" when mixed
- Preserve original error messages for other connection failures
- Add tests for error formatting scenarios

Fixes #96
@2color 2color requested review from aschmahmann and lidel July 16, 2025 20:27
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.

Better descriptions for dials that failed due to being for private addresses
1 participant