Show the not present configmap/secret name while fn create in err message [CLI-UX] (#1462)

This commit is contained in:
Vivek Singh
2019-12-10 22:58:52 +08:00
committed by Ta-Ching Chen
parent 2b4e53e926
commit 711d7c2c41
+2 -2
View File
@@ -235,7 +235,7 @@ func (opts *CreateSubCommand) complete(input cli.Input) error {
if k8serrors.IsNotFound(err) {
console.Warn(fmt.Sprintf("Secret %s not found in Namespace: %s. Secret needs to be present in the same namespace as function", secretName, fnNamespace))
} else {
return errors.Wrap(err, "error checking secret")
return errors.Wrapf(err, "error checking secret %s", secretName)
}
}
}
@@ -261,7 +261,7 @@ func (opts *CreateSubCommand) complete(input cli.Input) error {
if k8serrors.IsNotFound(err) {
console.Warn(fmt.Sprintf("ConfigMap %s not found in Namespace: %s. ConfigMap needs to be present in the same namespace as function", cfgMapName, fnNamespace))
} else {
return errors.Wrap(err, "error checking configmap")
return errors.Wrapf(err, "error checking configmap %s", cfgMapName)
}
}
}