lib: Wrap errors with errors.Wrap instead of fmt.Errorf (#6181)
This commit is contained in:
committed by
Audrius Butkevicius
parent
e2f6d0d6c4
commit
cf312abc72
@@ -10,6 +10,8 @@ import (
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/syncthing/syncthing/lib/dialer"
|
||||
syncthingprotocol "github.com/syncthing/syncthing/lib/protocol"
|
||||
"github.com/syncthing/syncthing/lib/relay/protocol"
|
||||
@@ -225,7 +227,7 @@ func performHandshakeAndValidation(conn *tls.Conn, uri *url.URL) error {
|
||||
if relayIDs != "" {
|
||||
relayID, err := syncthingprotocol.DeviceIDFromString(relayIDs)
|
||||
if err != nil {
|
||||
return fmt.Errorf("relay address contains invalid verification id: %s", err)
|
||||
return errors.Wrap(err, "relay address contains invalid verification id")
|
||||
}
|
||||
|
||||
certs := cs.PeerCertificates
|
||||
|
||||
Reference in New Issue
Block a user