-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
Description
Our current implementation of SecretService::connect
is non-ideal as it throws away valuable failure information when it fails to connect:
Lines 146 to 154 in f53e2e7
pub(crate) fn handle_conn_error(e: zbus::Error) -> Error { | |
match e { | |
zbus::Error::InterfaceNotFound | zbus::Error::Address(_) => Error::Unavailable, | |
zbus::Error::InputOutput(e) if e.kind() == std::io::ErrorKind::NotFound => { | |
Error::Unavailable | |
} | |
e => e.into(), | |
} | |
} |
It would be better if Error::Unavailable
changed from a unit variant to hold the original zbus
error. Its currently unclear if this can be done without a major breaking change.