feat(GODT-3172): detect missing keychain item

This commit is contained in:
Jakub
2024-01-04 08:28:17 +01:00
committed by Jakub Cuth
parent 89bb7b6389
commit 9b1daa0373
5 changed files with 41 additions and 5 deletions

View File

@ -168,10 +168,14 @@ func (s *SecretServiceDBusHelper) Get(serverURL string) (string, string, error)
serverAtt: serverURL,
})
if len(items) == 0 || err != nil {
if err != nil {
return "", "", err
}
if len(items) == 0 {
return "", "", ErrKeychainNoItem
}
item := items[0]
attributes, err := service.GetAttributes(item)