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
Does this issue reproduce with the latest release?
Yes
Summary
The crypto/tls and crypto/x509 packages (and maybe others?) return error messages differently in 1.20 than in 1.19. Errors are now wrapped down the calling chain. This does not appear to be mentioned in the 1.20 release notes, but is a breaking change for anyone looking at the types of these errors.
Example
When making a failed HTTPS connection, in 1.19, the following error was returned:
Side note: It only breaks when using direct type assertions, but with errors.As is should still work (*tls.CertificateVerificationError has an Unwrap method).
What version of Go are you using (
go version
)?1.20.2
Does this issue reproduce with the latest release?
Yes
Summary
The
crypto/tls
andcrypto/x509
packages (and maybe others?) return error messages differently in 1.20 than in 1.19. Errors are now wrapped down the calling chain. This does not appear to be mentioned in the 1.20 release notes, but is a breaking change for anyone looking at the types of these errors.Example
When making a failed HTTPS connection, in 1.19, the following error was returned:
In 1.20, this is what is returned:
What did you expect to see?
Either the error types returned should have been the same, or this should have been called out in 1.20 release notes.
What did you see instead?
I could not find it mentioned on https://go.dev/doc/go1.20#errors
The text was updated successfully, but these errors were encountered: