From 7e2d1d8c715b0321b86a4096c485a5a72eeb9cf9 Mon Sep 17 00:00:00 2001 From: neri Date: Mon, 9 May 2022 23:07:24 +0200 Subject: [PATCH] Revert "add a custom response for full storage" This reverts commit eddbeec7eff7fa837ea984a3073451798800f4d7. --- src/multipart.rs | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/multipart.rs b/src/multipart.rs index 15ca55f..16eada6 100644 --- a/src/multipart.rs +++ b/src/multipart.rs @@ -173,20 +173,10 @@ async fn write_to_file( ))); } } - file.write_all(&chunk) - .await - .map_err(|write_err| match write_err.kind() { - std::io::ErrorKind::StorageFull => { - log::warn!("storage is full {:?}", write_err); - error::ErrorServiceUnavailable( - "storage is full, you will need to wait for some files to expire", - ) - } - _ => { - log::error!("could not write file {:?}", write_err); - error::ErrorInternalServerError("could not write file") - } - })?; + file.write_all(&chunk).await.map_err(|write_err| { + log::error!("could not write file {:?}", write_err); + error::ErrorInternalServerError("could not write file") + })?; } Ok(written_bytes) }