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

x/net/http2: errors don't implement Temporary interface #35286

Open
kirillx opened this issue Oct 31, 2019 · 0 comments

Comments

@kirillx
Copy link

@kirillx kirillx commented Oct 31, 2019

What version of Go are you using (go version)?

1.13

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

Linux

What did you do?

HTTP client application issuing std POST/GET requests.

What is wrong?

Sometimes http client returns the below errors and there is no good way to verify that they are temporary and might be retried:
a) http.http2GoAwayError (e.g. 'http2: server sent GOAWAY and closed the connection; LastStreamID=8329, ErrCode=NO_ERROR, debug="max_age"'
b) http.http2StreamError (e.g. 'stream error: stream ID 309; INTERNAL_ERROR')

After googling one can even find that some detect such errors and retry on them like in cloud.google.com/go/storage/reader.go:
if strings.HasSuffix(err.Error(), "INTERNAL_ERROR") && strings.Contains(reflect.TypeOf(err).String(), "http2") {

So if there is no objections I would make these 2 errors implement Temporary() interface returning true.

@bradfitz bradfitz changed the title http2 errors don't implement Temporary interface x/net/http2: errors don't implement Temporary interface Oct 31, 2019
@bcmills bcmills added this to the Unplanned milestone Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.