forked from TrueCloudLab/certificates
Wrap json errors.
This commit is contained in:
parent
640f523150
commit
536536c92d
1 changed files with 2 additions and 2 deletions
|
@ -562,7 +562,7 @@ func ProvisionerToCertificates(p *linkedca.Provisioner) (provisioner.Interface,
|
|||
|
||||
details := p.Details.GetData()
|
||||
if details == nil {
|
||||
return nil, fmt.Errorf("provisioner does not have any details")
|
||||
return nil, errors.New("provisioner does not have any details")
|
||||
}
|
||||
|
||||
options := optionsToCertificates(p)
|
||||
|
@ -571,7 +571,7 @@ func ProvisionerToCertificates(p *linkedca.Provisioner) (provisioner.Interface,
|
|||
case *linkedca.ProvisionerDetails_JWK:
|
||||
jwk := new(jose.JSONWebKey)
|
||||
if err := json.Unmarshal(d.JWK.PublicKey, &jwk); err != nil {
|
||||
return nil, err
|
||||
return nil, errors.Wrap(err, "error unmarshaling public key")
|
||||
}
|
||||
return &provisioner.JWK{
|
||||
ID: p.Id,
|
||||
|
|
Loading…
Reference in a new issue