Skip to content
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

fix: include url on HTTP error #29

Merged
merged 1 commit into from
Jan 8, 2025
Merged

fix: include url on HTTP error #29

merged 1 commit into from
Jan 8, 2025

Conversation

lidel
Copy link
Member

@lidel lidel commented Jan 7, 2025

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
9 checks passed
@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