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

provide more context of opaque hyper errors #3505

Open
GlenDC opened this issue Dec 27, 2023 · 1 comment
Open

provide more context of opaque hyper errors #3505

GlenDC opened this issue Dec 27, 2023 · 1 comment
Labels
C-feature Category: feature. This is adding a new feature.

Comments

@GlenDC
Copy link
Contributor

GlenDC commented Dec 27, 2023

Is your feature request related to a problem? Please describe.

Hyper errors are opaque, in the sense that they can contain a lot of different things,
but except for a set of things you can test for, there is lot you cannot for.

However, hyper does make up for that, by providing clear error messages,
which honestly given a decent tracing setup is fine enough for issues
that you do perhaps want to prevent.

The problem however is that for plenty of issues it doesn't tell what it receives,
despite it having access to these values. Now I get that this might be to safe on resources,
given it does mean you now would need to store these somewhere somehow.
This is especially complicated as these errors can come from a pretty deep chain.
Which makes it even the more complex.

Still.. Not sure how else I would easily debug rare issues that perhaps are things
that indicate I really need to improve my setup, or if it's just a bogus client/server.

Describe the solution you'd like

When receiving errors (packed by https://docs.rs/hyper/latest/hyper/struct.Error.html)
such as invalid HTTP version parsed it would be great if it could also tell what it received,
e.g. invalid HTTP version parsed (HTTP/3), or something like that.
because for now I have a hyper 0.14 client running somewhere which gave this error,
and it would be great to know what that server responded back...
I'm guessing it's going to be HTTP/3, but how to know...

Describe alternatives you've considered

Only alternative I see is keep a bucket with such errors where I can store the full request/response
dump... But that seems a bit excessive.

@GlenDC GlenDC added the C-feature Category: feature. This is adding a new feature. label Dec 27, 2023
@GlenDC
Copy link
Contributor Author

GlenDC commented Dec 27, 2023

In case you want to action this issue, I'm more then happy to contribute the code changes for it, with some guidance.
I don't expect you or someone else to put in that work, I can volunteer my time for it.

Or perhaps there are already ways to get this info today, but I couldn't find it by reading the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: feature. This is adding a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant