mirror of
https://github.com/quexten/goldwarden.git
synced 2024-11-27 11:02:46 +03:00
Merge pull request #129 from SuperSandro2000/more-error-handling
Fix more error handling
This commit is contained in:
commit
60abbb0f82
@ -34,7 +34,8 @@ func handleLogin(msg messages.IPCMessage, cfg *config.Config, vault *vault.Vault
|
||||
var masterKey crypto.MasterKey
|
||||
var masterpasswordHash string
|
||||
|
||||
if secret, err := cfg.GetClientSecret(); err == nil && secret != "" {
|
||||
var secret string // don't shadow err in the next line
|
||||
if secret, err = cfg.GetClientSecret(); err == nil && secret != "" {
|
||||
actionsLog.Info("Logging in with client secret")
|
||||
token, masterKey, masterpasswordHash, err = bitwarden.LoginWithApiKey(ctx, req.Email, cfg, vault)
|
||||
} else if req.Passwordless {
|
||||
|
@ -149,9 +149,9 @@ func (vault *Vault) isSSHKey(cipher models.Cipher) bool {
|
||||
cipherID := cipher.ID.String()
|
||||
if cipher.OrganizationID != nil {
|
||||
orgID := cipher.OrganizationID.String()
|
||||
vaultLog.Error("Failed to decrypt field name with on cipher "+cipherID+" in organization "+orgID, err.Error())
|
||||
vaultLog.Error("Failed to decrypt field name with on cipher %s in organization %s: %s", cipherID, orgID, err.Error())
|
||||
} else {
|
||||
vaultLog.Error("Failed to decrypt field name with on cipher "+cipherID, err.Error())
|
||||
vaultLog.Error("Failed to decrypt field name with on cipher %s: %s", cipherID, err.Error())
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user