From e55fa38c9995294edcdf0f7f4f95dc767b343fb5 Mon Sep 17 00:00:00 2001 From: trinity-1686a Date: Tue, 18 Jan 2022 12:22:31 +0100 Subject: Add date verification to presigned urls (#196) fix #96 fix #162 by returning Forbidden instead Bad Request Co-authored-by: Trinity Pointard Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/196 Co-authored-by: trinity-1686a Co-committed-by: trinity-1686a --- src/api/error.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/api/error.rs') diff --git a/src/api/error.rs b/src/api/error.rs index 955faed1..8602cfdc 100644 --- a/src/api/error.rs +++ b/src/api/error.rs @@ -206,11 +206,7 @@ where fn ok_or_bad_request>(self, reason: M) -> Result { match self { Ok(x) => Ok(x), - Err(e) => Err(Error::BadRequest(format!( - "{}: {}", - reason.as_ref(), - e.to_string() - ))), + Err(e) => Err(Error::BadRequest(format!("{}: {}", reason.as_ref(), e))), } } } -- cgit v1.2.3