mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-07-26 07:58:14 +00:00
Fix for https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/1293 Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1356 Reviewed-by: Alex <lx@deuxfleurs.fr> Co-authored-by: Roman Ivanov <xatikopro@gmail.com> Co-committed-by: Roman Ivanov <xatikopro@gmail.com>
This commit is contained in:
@@ -76,7 +76,9 @@ impl RequestHandler for GetKeyInfoRequest {
|
||||
.await?
|
||||
.into_iter()
|
||||
.collect::<Vec<_>>();
|
||||
if candidates.len() != 1 {
|
||||
if candidates.is_empty() {
|
||||
return Err(Error::NoSuchAccessKey(search.clone()));
|
||||
} else if candidates.len() != 1 {
|
||||
return Err(Error::bad_request(format!(
|
||||
"{} matching keys",
|
||||
candidates.len()
|
||||
|
||||
Reference in New Issue
Block a user