Skip to content

Commit

Permalink
refactor: remove fingerprint from error string
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Zapletal <[email protected]>
  • Loading branch information
lzap authored and ezr-ondrej committed Sep 27, 2023
1 parent 325b594 commit 88f4954
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/jobs/launch_instance_aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ func DoEnsurePubkeyOnAWS(ctx context.Context, args *LaunchInstanceAWSTaskArgs) e

if errors.Is(err, http.ErrDuplicatePubkey) {
// key not found by fingerprint but importing failed for duplicate err so fingerprints do not match
return fmt.Errorf("key with fingerprint %s not found on AWS, but importing the key failed: %w", pubkey.Fingerprint, err)
logger.Warn().Msgf("Pubkey with fingerprint %s not found on AWS, but importing the key failed: %s", pubkey.Fingerprint, err.Error())
return fmt.Errorf("cannot upload aws pubkey because of duplicate: %w", err)
} else if err != nil {
return fmt.Errorf("cannot upload aws pubkey: %w", err)
}
Expand Down

0 comments on commit 88f4954

Please sign in to comment.