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/model/helper/error.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/model/helper/error.rs') diff --git a/src/model/helper/error.rs b/src/model/helper/error.rs index b9b515f3..30b2ba32 100644 --- a/src/model/helper/error.rs +++ b/src/model/helper/error.rs @@ -31,11 +31,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