Skip to content

fix: include url on HTTP error - #29

Merged
lidel merged 1 commit into
masterfrom
fix/url-on-http-error
Jan 8, 2025
Merged

lidel merged 1 commit into
masterfrom
fix/url-on-http-error

Conversation

@lidel

@lidel lidel commented Jan 7, 2025 •

Copy link
Copy Markdown
Contributor

End user applications built with this library have per TLD DoH resolvers (example).

Including the URL of DoH endpoint helps end user to self-service when one of DoH resolvers goes down (example: ipfs/boxo#772)

Demo

Let's assume https://example.com/dns-query responsible for resolving .test TLD is down.

Without this PR, user gets confusing error:

$ curl http://this-fails.test.ipns.localhost:8088/
failed to resolve /ipns/this-fails.test/: DNSLink lookup for "this-fails.test." failed: HTTP error: "405 Method Not Allowed" [405

With this PR, end user gets meaningful error HTTP error: "405 Method Not Allowed" [405] from "https://example.com/dns-query"

$ curl http://test.crypto.ipns.localhost:8090/
failed to resolve /ipns/this-fails.test/: DNSLink lookup for "this-fails.test." failed: HTTP error: "405 Method Not Allowed" [405] from "https://example.com/dns-query"

we have per TLD resolvers and this helps end user
to self-service when one of DoH resolvers goes down
@lidel
lidel merged commit 08689e9 into master Jan 8, 2025
@lidel
lidel deleted the fix/url-on-http-error branch January 8, 2025 20:47
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.

2 participants