Browse Source

Revert "add a custom response for full storage"

This reverts commit eddbeec7ef.
master
neri 1 week ago
parent
commit
7e2d1d8c71
  1. 18
      src/multipart.rs

18
src/multipart.rs

@ -173,20 +173,10 @@ async fn write_to_file( @@ -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)
}

Loading…
Cancel
Save