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

Reason::PROTOCOL_ERROR and Reason::INTERNAL_ERROR provide little useful information about the… error. #558

Open
nagisa opened this issue Sep 21, 2021 · 1 comment

Comments

@nagisa
Copy link

nagisa commented Sep 21, 2021

I received an error that reads like this:

error: failed to convert response body to bytes (in application)
    caused by: error reading a body from connection: protocol error: unexpected internal error encountered (in hyper)
    caused by: protocol error: unexpected internal error encountered (in h2?)

I believe the last part ("protocol error: unexpected internal error encountered") is coming from h2. I'm not sure where it originates and searching the code doesn't have present many instances of INTERNAL_ERROR, either. This error is pretty poor and leaves one hanging, so I feel like we should not have these variants as valid options at all, always opting for a more descriptive reason of some sort.

@seanmonstar
Copy link
Member

True, the messages don't explain much. The error codes themselves are in the HTTP/2 specification, and a remote can send them with optional extra debug info, or with nothing. If they send us nothing else, there's not too much more we can do... Though, there is #556 which will try to improve the messages some. In particular, it will add the extra debug data if received, and it will include in the error message whether it was an error code received from the remote, or an error condition we detected locally in the library.

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

No branches or pull requests

2 participants