test: some error rework

This commit is contained in:
Gwen Lg
2026-02-17 21:01:47 +01:00
committed by Alex
parent 8341b7f914
commit 06e9756729
4 changed files with 43 additions and 17 deletions
+4 -1
View File
@@ -400,7 +400,10 @@ pub fn verify_v4(
) -> Result<Key, Error> {
let scope_expected = compute_scope(&auth.date, &garage.config.s3_api.s3_region, service);
if auth.scope != scope_expected {
return Err(Error::AuthorizationHeaderMalformed(auth.scope.to_string()));
return Err(Error::AuthorizationHeaderMalformed {
unexpected: auth.scope.to_string(),
expected: scope_expected,
});
}
let key = garage