mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
cli: improve error handling for validator
This commit is contained in:
parent
e130188ecd
commit
63d938d9a4
@ -42,7 +42,7 @@ func UpdateInitMeasurements(config config.AttestationCfg, ownerID, clusterID str
|
||||
// the current implementation does not support it, but can be changed if we decide to add support in the future
|
||||
return updateMeasurementTDX(m, uint32(measurements.TDXIndexClusterID), clusterID)
|
||||
default:
|
||||
return fmt.Errorf("UpdateInitMeasurements: unknown attestation variant")
|
||||
return fmt.Errorf("selecting attestation variant: unknown attestation variant")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@ func (i *initCmd) initialize(cmd *cobra.Command, newDialer func(validator atls.V
|
||||
i.log.Debugf("Creating aTLS Validator for %s", conf.GetAttestationConfig().GetVariant())
|
||||
validator, err := cloudcmd.NewValidator(cmd, conf.GetAttestationConfig(), i.log)
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("creating new validator: %w", err)
|
||||
}
|
||||
i.log.Debugf("Created a new validator")
|
||||
serviceAccURI, err := i.getMarshaledServiceAccountURI(provider, conf, fileHandler)
|
||||
|
@ -101,7 +101,7 @@ func (r *recoverCmd) recover(
|
||||
r.log.Debugf("Creating aTLS Validator for %s", conf.GetAttestationConfig().GetVariant())
|
||||
validator, err := cloudcmd.NewValidator(cmd, conf.GetAttestationConfig(), r.log)
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("creating new validator: %w", err)
|
||||
}
|
||||
r.log.Debugf("Created a new validator")
|
||||
doer.setDialer(newDialer(validator), flags.endpoint)
|
||||
|
Loading…
Reference in New Issue
Block a user