You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The libsecret backend will return a secretError with message that the keychain does not exist:
2019/06/01 07:13:25 [keyring] Considering backends: [secret-service kwallet pass file]
Error: Failed to read tokens from backend storage: The collection "vault" does not exist. Please add a key first
$ echo$?
255
The returned error is a generic type secretError and so I could handle this by wrapping keyring.List() and checking err.Error() contains the string "Please add a key first", but I am wondering what the expected behavior is for the library itself and if perhaps libsecret should be modified to not return an err if the collection does not yet exist?
I haven't checked the other backend types for how they handle first-use of Get and Keys yet.
The text was updated successfully, but these errors were encountered:
joemiller
changed the title
API behavior between backends is not consistent
API behavior between backends (may not be) consistent
Jun 1, 2019
Example on first-use of an application:
The returned error is a generic type
secretError
and so I could handle this by wrapping keyring.List() and checking err.Error() contains the string "Please add a key first", but I am wondering what the expected behavior is for the library itself and if perhaps libsecret should be modified to not return an err if the collection does not yet exist?I haven't checked the other backend types for how they handle first-use of Get and Keys yet.
The text was updated successfully, but these errors were encountered: