api: include store in invalid owner errors

since a group might exist in plenty stores

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2020-11-12 11:30:34 +01:00 committed by Wolfgang Bumiller
parent f6aa7b38bf
commit 1ed022576c
1 changed files with 8 additions and 2 deletions

View File

@ -168,7 +168,10 @@ fn list_groups(
let owner = match datastore.get_owner(&group) { let owner = match datastore.get_owner(&group) {
Ok(auth_id) => auth_id, Ok(auth_id) => auth_id,
Err(err) => { Err(err) => {
println!("Failed to get owner of group '{}' - {}", group, err); eprintln!("Failed to get owner of group '{}/{}' - {}",
&store,
group,
err);
return group_info; 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) { let owner = match store.get_owner(&group) {
Ok(owner) => owner, Ok(owner) => owner,
Err(err) => { Err(err) => {
eprintln!("Failed to get owner of group '{}' - {}", group, err); eprintln!("Failed to get owner of group '{}/{}' - {}",
store.name(),
group,
err);
return false; return false;
}, },
}; };