You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While this behavior is not explicitly disallowed by the interface, the net/http.Client implementation does check for this and will print a corresponding log error. This erroneous log message is particularly annoying when expecting all program output to be JSON, which is how I found this.
EDIT: Also of note, this is eluded to in the docs of the net/http.RoundTripper interface with the line "A non-nil err should be reserved for failure to obtain a response", but it could certainly be worded better/more explicitly on that side.
The text was updated successfully, but these errors were encountered:
The code in question here is within
RoundTripper.RoundTrip()
which, in the check forurl.Error
, returns both the response and an error.https://github.com/hashicorp/go-retryablehttp/blob/master/roundtripper.go#L47
While this behavior is not explicitly disallowed by the interface, the net/http.Client implementation does check for this and will print a corresponding log error. This erroneous log message is particularly annoying when expecting all program output to be JSON, which is how I found this.
From this conversation, that validation is expected.
EDIT: Also of note, this is eluded to in the docs of the net/http.RoundTripper interface with the line "A non-nil err should be reserved for failure to obtain a response", but it could certainly be worded better/more explicitly on that side.
The text was updated successfully, but these errors were encountered: