-
Notifications
You must be signed in to change notification settings - Fork 18k
doc/go1.15: add note about crypto/tls error wrapping change #40554
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
Comments
Yeah that sounds good. I'll take care of that. Thanks @rolandshoemaker. |
Change https://golang.org/cl/247698 mentions this issue: |
Hi @rolandshoemaker @katiehockman I've noticed the original description of this issue refers to direct casting of errors to However, I can't really see why the final description of the change https://go-review.googlesource.com/c/go/+/247698/4/doc/go1.15.html refers to assertion of Could you please explain this to me? Does go1.15 really affect |
Yeah the release note should probably say "the original error" rather than "the original net.Error". I'll send a CL later if no one beats me to it. |
* Do to golang 1.15 change, errors are now wrapped in a private permanentError * See: golang/go#40554 [#177498036](https://www.pivotaltracker.com/story/show/177498036)
After https://go-review.googlesource.com/c/go/+/227840 http.Client and tls.Client will now return an opaque
tls.permanentError
in place of what were previously public error types (i.e.net.OpErr
). This means that in order to get the previously top level error users need to useerrors.As
(orerrors.Unwrap
) to get the useful error (best practice should presumably be to always useerrors.As
but directly casting tonet.OpErr
is definitely quite common).cc @FiloSottile @katiehockman
The text was updated successfully, but these errors were encountered: