mirror of
https://github.com/kopia/kopia.git
synced 2025-12-23 22:57:50 -05:00
chore(cli): add details to persistent password error message (#4480)
Extends error message with a generic, OS-independent hint about what the source of the error may be and a potential solution. Also, modifies error message to avoid duplicate messages. - kopia/kopia#4449
This commit is contained in:
@@ -84,7 +84,7 @@ func (c *App) getPasswordFromFlags(ctx context.Context, isCreate, allowPersisten
|
||||
}
|
||||
|
||||
if !errors.Is(err, passwordpersist.ErrPasswordNotFound) {
|
||||
return "", errors.Wrap(err, "error getting persistent password")
|
||||
return "", errors.Wrap(err, "cannot get persistent password")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ func (keyringStrategy) GetPassword(ctx context.Context, configFile string) (stri
|
||||
case errors.Is(err, keyring.ErrUnsupportedPlatform):
|
||||
return "", ErrPasswordNotFound
|
||||
default:
|
||||
return "", errors.Wrap(err, "error retrieving password from OS keyring")
|
||||
return "", errors.Wrap(err, "error retrieving password from OS keyring, the keyring may be locked, attempt unlocking it using the OS-specific method")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user