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

Show TCP connection info on fetch errors #24922

Closed
magurotuna opened this issue Aug 7, 2024 · 0 comments · Fixed by #24939
Closed

Show TCP connection info on fetch errors #24922

magurotuna opened this issue Aug 7, 2024 · 0 comments · Fixed by #24939
Labels
ext/fetch related to the ext/fetch

Comments

@magurotuna
Copy link
Member

As #24835 illustrates, recent versions of Deno have got unfriendly error messages on fetch errors.
Although this issue itself will be resolved by #24910, it would be even better if the error message could have other bits of information. In particular, TCP/IP level info i.e. src/dest addr and port might be helpful for debugging.

Proposed message format

When TCP/IP info is available

When fetch fails after TCP connection is established, the error message will look like:

TypeError: error sending request from 127.0.0.1:50472 for http://localhost:4444/ (127.0.0.1:4444): client error (SendRequest): connection error: Connection reset by peer (os error 54)

This contains 127.0.0.1:50472 as a source node and 127.0.0.1:4444 as a destination node.

When unavailable

When fetch fails before TCP connection is established, the error message will be like:

TypeError: error sending request for url (https://nonexistent.deno.land/): client error (Connect): dns error: failed to lookup address information: nodename nor servname provided, or not known: failed to lookup address information: nodename nor servname provided, or not known

Note this does not have TCP/IP level connection info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ext/fetch related to the ext/fetch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant