fix: pr feedback

This commit is contained in:
Jahziel Villasana-Espinoza 2024-05-28 14:51:41 -04:00
parent 140fee3b28
commit 71bb25ff76
2 changed files with 2 additions and 2 deletions

View file

@ -4231,7 +4231,7 @@ WHERE
for _, asset := range res {
decryptedVal, err := decrypt(asset.Value, ds.serverPrivateKey)
if err != nil {
return nil, ctxerr.Wrap(ctx, err, fmt.Sprintf("decrypting mdm config asset %s", asset.Name))
return nil, ctxerr.Wrapf(ctx, err, "decrypting mdm config asset %s", asset.Name)
}
assetMap[asset.Name] = fleet.MDMConfigAsset{Name: asset.Name, Value: decryptedVal}

View file

@ -2142,7 +2142,7 @@ func (svc *Service) GetMDMAppleCSR(ctx context.Context) ([]byte, error) {
}
if len(svc.config.Server.PrivateKey) == 0 {
return nil, ctxerr.Wrap(ctx, errors.New("no private key configured"))
return nil, ctxerr.New(ctx, "no private key configured")
}
vc, ok := viewer.FromContext(ctx)