Skip to content

Commit 13b08eb

Browse files
committed
Changed error to reflect bad credentials
1 parent d4585bf commit 13b08eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/bitwarden/schema/session.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ func (s *Session) CacheKey(key, email, password string) error {
122122
if encryptedKey, err := crypto.NewEncrypted(key); err != nil {
123123
return err
124124
} else if decryptKey := s.MakeDecryptKey(strings.ToLower(email), password, encryptedKey); decryptKey == nil {
125-
return ErrBadParameter.With("CacheKey")
125+
// Probably a bad key, email or password
126+
return ErrNotAuthorized.With("Failed to create decryption key")
126127
} else {
127128
s.cryptKey = decryptKey
128129
}

0 commit comments

Comments
 (0)