Skip to content

feat(iroh-dns): Improve error messages#4410

Open
Frando wants to merge 2 commits into
mainfrom
Frando/improve-dns-errors
Open

feat(iroh-dns): Improve error messages#4410
Frando wants to merge 2 commits into
mainfrom
Frando/improve-dns-errors

Conversation

@Frando

@Frando Frando commented Jul 14, 2026

Copy link
Copy Markdown
Member

Description

This improves the error message we show when calling endpoint.connect(endpoint_id, alpn) without internet connectivity, or with DNS blocked or similar.

Before:

No addressing information available: All address lookup services failed or produced no results
    Service 'dns' failed: no calls succeeded: [Failed to resolve TXT recordFailed to resolve TXT recordFailed to resolve TXT recordFailed to resolve TXT recordFailed to resolve TXT
 recordFailed to resolve TXT recordFailed to resolve TXT record]

After:

Failed to resolve remote address: All address lookup services failed or produced no results
    Service 'dns' failed: Failed to retrieve TXT record for _iroh.38g86cenj4anit756ah78o5ea84nmfgsyhmn64ibxosgyc9jku8y.staging-dns.iroh.link.: no connections available

Breaking Changes

None.

Notes & open questions

The no connections available at the end of the message is, unfortunately, all we get from hickory-resolver. This can be improved once we land #4036

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.
  • This PR was created by a human that thought critically about the
    proposed change and wrote an as clear and concise description as
    they could.
  • This PR isn't slop, and is carefully crafted to do have the
    intented effect.

@Frando
Frando marked this pull request as ready for review July 14, 2026 07:59
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/4410/docs/iroh/

Last updated: 2026-07-15T11:02:52Z

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: 4622dc4

@Frando
Frando force-pushed the Frando/improve-dns-errors branch from adf54c4 to 4d08e83 Compare July 14, 2026 08:03
@Frando
Frando force-pushed the Frando/improve-dns-errors branch from 4d08e83 to 7eeb85a Compare July 14, 2026 08:39
@n0bot n0bot Bot added this to iroh Jul 14, 2026
@github-project-automation github-project-automation Bot moved this to 🚑 Needs Triage in iroh Jul 14, 2026
Comment thread iroh-dns/src/dns.rs Outdated
source: AnyError,
},
#[error("Failed to retrieve {kind} record for {host}")]
Resolve2 {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AnyError has a downcast_ref method. Can this not be done without breaking the API by trying to downcast it, if it works you get something that carries the host and kind, if not you have to fallback to the current version.

@github-project-automation github-project-automation Bot moved this from 🚑 Needs Triage to 🏗 In progress in iroh Jul 14, 2026
@flub

flub commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Please use the checklist as well :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

2 participants