pkg/identity: Use identity error class (#2488)

This commit is contained in:
Ivan Fraixedes 2019-07-09 04:52:52 +02:00 committed by Stefan Benten
parent 93cd05d600
commit 50d601ab07

View File

@ -255,7 +255,7 @@ func NodeIDFromPEM(pemBytes []byte) (storj.NodeID, error) {
func NodeIDFromCert(cert *x509.Certificate) (id storj.NodeID, err error) {
version, err := storj.IDVersionFromCert(cert)
if err != nil {
return id, err
return id, Error.Wrap(err)
}
return NodeIDFromKey(cert.PublicKey, version)
}