net/http: Timeout while reading response body gives unexposed http.httpError #58279
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Issue not reproducible on playground (needs network).
Might need to adjust timeout the hit the reading of the body on your network.
https://play.golang.com/p/9yaX7aYDf4A
What did you expect to see?
A
*url.Error
, since that is whatDo
and related method returns, but another exposed error type would also work. Preferably wrapping the underlying error (context.DeadlineExceeded
in this case)What did you see instead?
A
*http.httpError
, which is not exposed, and does not wrap underlying errors. This makes it impossible to handle this timeout witherrors.Is
orerrors.As
The text was updated successfully, but these errors were encountered: