http3: introduce an HTTP/3 error type (#4039)

* http3: introduce an HTTP/3 error type

* http3: use a pointer receiver for the Error
This commit is contained in:
Marten Seemann
2023-09-16 18:57:50 +07:00
committed by GitHub
parent ab1c1be9a9
commit d8cc4cb3ef
7 changed files with 125 additions and 12 deletions

View File

@@ -318,13 +318,13 @@ func (c *client) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Respon
}
conn.CloseWithError(quic.ApplicationErrorCode(rerr.connErr), reason)
}
return nil, rerr.err
return nil, maybeReplaceError(rerr.err)
}
if opt.DontCloseRequestStream {
close(reqDone)
<-done
}
return rsp, rerr.err
return rsp, maybeReplaceError(rerr.err)
}
// cancelingReader reads from the io.Reader.