Only present proxy password delete error if it is not a "does not exist" error

Prevent error on deletion when the proxy password does not exist

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-11-07 02:09:48 +09:00
parent c75a324ef0
commit fa33dd61cf

View file

@ -363,6 +363,8 @@ void AccountManager::saveAccountHelper(Account *acc, QSettings &settings, bool s
connect(job, &QKeychain::Job::finished, this, [](const QKeychain::Job *const incomingJob) {
if (incomingJob->error() == QKeychain::NoError) {
qCInfo(lcAccountManager) << "Deleted proxy password from keychain";
} else if (incomingJob->error() == QKeychain::EntryNotFound) {
qCDebug(lcAccountManager) << "Proxy password not found in keychain, can't delete";
} else {
qCWarning(lcAccountManager) << "Failed to delete proxy password to keychain" << incomingJob->errorString();
}