Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Output a more useful resolve error #9

Merged
merged 2 commits into from
Apr 7, 2021
Merged

Conversation

gammazero
Copy link
Contributor

@gammazero gammazero commented Apr 6, 2021

This outputs a missage that blames a specific sife for not having DNSLink record. For example, the error message looks like:

could not resolve name: bad.example.net is missing DNSLink record (https://docs.ipfs.io/concepts/dnslink/)

The "could not resolve name" portion is still present because the returned error wraps the original ErrResolveFailed, allowing code to test if the error is an ErrResolveFailed error.

This addresses go-ipfs issue 8000

This outputs a missage that blames a specific sife for not having DNSLink record.  For example, the error message looks like:

`could not resolve name: bad.example.net is missing DNSLink record (https://docs.ipfs.io/concepts/dnslink/)`

The "could not resolve name" portion is still present because the returned error wraps the original ErrResolveFailed, allowing code to test if the error is an ErrorResolveFailed error.
@gammazero gammazero requested a review from lidel April 6, 2021 09:21
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

@gammazero looks good to me, as long we include the fix suggested below.

base.go Outdated Show resolved Hide resolved
@gammazero gammazero merged commit 3d90782 into master Apr 7, 2021
@gammazero gammazero deleted the chore/improve-dnslink-error branch April 7, 2021 05:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants