From 1ed022576cef92d68e97d30bea3e91da8dc14085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Thu, 12 Nov 2020 11:30:34 +0100 Subject: [PATCH] api: include store in invalid owner errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit since a group might exist in plenty stores Signed-off-by: Fabian Grünbichler --- src/api2/admin/datastore.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/api2/admin/datastore.rs b/src/api2/admin/datastore.rs index 6d9de4e4..872d081e 100644 --- a/src/api2/admin/datastore.rs +++ b/src/api2/admin/datastore.rs @@ -168,7 +168,10 @@ fn list_groups( let owner = match datastore.get_owner(&group) { Ok(auth_id) => auth_id, Err(err) => { - println!("Failed to get owner of group '{}' - {}", group, err); + eprintln!("Failed to get owner of group '{}/{}' - {}", + &store, + group, + err); return group_info; }, }; @@ -481,7 +484,10 @@ fn get_snapshots_count(store: &DataStore, filter_owner: Option<&Authid>) -> Resu let owner = match store.get_owner(&group) { Ok(owner) => owner, Err(err) => { - eprintln!("Failed to get owner of group '{}' - {}", group, err); + eprintln!("Failed to get owner of group '{}/{}' - {}", + store.name(), + group, + err); return false; }, };