Merge pull request #41312 from thaJeztah/19.03_backport_pass_network_error
[19.03 backport] Check for context error that is wrapped in url.Error
This commit is contained in:
commit
50b33bd3cd
1 changed files with 1 additions and 2 deletions
|
@ -143,8 +143,7 @@ func (cli *Client) doRequest(ctx context.Context, req *http.Request) (serverResp
|
|||
|
||||
// Don't decorate context sentinel errors; users may be comparing to
|
||||
// them directly.
|
||||
switch err {
|
||||
case context.Canceled, context.DeadlineExceeded:
|
||||
if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
|
||||
return serverResp, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue