Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please fail with KeyringError::NoBackendFound when there is no org.freedesktop.secrets available #14

Closed
argv-minus-one opened this issue Sep 12, 2019 · 2 comments

Comments

@argv-minus-one
Copy link

When there is no Secret Service implementation available (i.e. connecting to D-Bus was successful, but there is no org.freedesktop.secrets service), the error is KeyringError::SecretServiceError(SsError::Dbus), where the name of the underlying dbus::Error is org.freedesktop.DBus.Error.ServiceUnknown.

In this situation, the keyring call should probably fail with KeyringError::NoBackendFound instead.

Failure to connect to D-Bus (because there is no session bus, and auto-starting it failed) should probably also result in KeyringError::NoBackendFound, but there doesn't appear to be a well-defined error name for that situation. Potential error names include org.freedesktop.DBus.Error.NoServer, org.freedesktop.DBus.Error.FileNotFound, or org.freedesktop.DBus.Error.NotSupported (not an exhaustive list).

@hwchen
Copy link
Owner

hwchen commented Sep 21, 2019

Thanks for looking into this! Having a KeyringError::NoBackendFound makes sense. Happy to take a PR, or I'll look into it when I have time.

@hwchen
Copy link
Owner

hwchen commented Jan 5, 2021

Finally realized that this probably belongs in keyring repo. At this moment it’s unlikely that I try to create more custom errors for dbus errors here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants