Skip to content

Commit 54a308b

Browse files
committed
Improve error message when user provide invalid certificate key
1 parent 6f6890b commit 54a308b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/kubeadm/app/phases/copycerts/copycerts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func UploadCerts(client clientset.Interface, cfg *kubeadmapi.InitConfiguration,
8989
fmt.Printf("[upload-certs] Storing the certificates in Secret %q in the %q Namespace\n", kubeadmconstants.KubeadmCertsSecret, metav1.NamespaceSystem)
9090
decodedKey, err := hex.DecodeString(key)
9191
if err != nil {
92-
return err
92+
return errors.Wrap(err, "error decoding certificate key")
9393
}
9494
tokenID, err := createShortLivedBootstrapToken(client)
9595
if err != nil {

0 commit comments

Comments
 (0)