Skip to content

Commit

Permalink
Tell what error occured
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 committed Nov 13, 2024
1 parent d55f805 commit 954bf1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/metal-api/internal/service/machine-service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,7 @@ func validateAllocationSpec(allocationSpec *machineAllocationSpec) error {
for _, pubKey := range allocationSpec.SSHPubKeys {
_, err := ssh.ParsePublicKey([]byte(pubKey))
if err != nil {
return fmt.Errorf("invalid public SSH key: %s", pubKey)
return fmt.Errorf("invalid public SSH key: %s error:%w", pubKey, err)
}
}

Expand Down

0 comments on commit 954bf1d

Please sign in to comment.