Skip to content

Commit 3442bcc

Browse files
committed
don't report error on unknown mime type from S3
1 parent d01b9e3 commit 3442bcc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/web/file.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ impl File {
3636

3737
impl IntoResponse for File {
3838
fn into_response(self) -> AxumResponse {
39-
let content_type: Mime = self.0.mime.parse::<Mime>().unwrap_or_else(|e| {
40-
report_error(&anyhow!(e).context("could not parse mime from storage object"));
41-
mime::APPLICATION_OCTET_STREAM
42-
});
39+
let content_type: Mime = self
40+
.0
41+
.mime
42+
.parse::<Mime>()
43+
.unwrap_or(mime::APPLICATION_OCTET_STREAM);
4344

4445
(
4546
StatusCode::OK,

0 commit comments

Comments
 (0)