remove todos
This commit is contained in:
parent
6717fbe20b
commit
de17c738d2
2 changed files with 9 additions and 2 deletions
4
src/cache/fs.rs
vendored
4
src/cache/fs.rs
vendored
|
@ -1,3 +1,4 @@
|
|||
use actix_web::HttpResponse;
|
||||
use bytes::BytesMut;
|
||||
use futures::{Future, Stream, StreamExt};
|
||||
use once_cell::sync::Lazy;
|
||||
|
@ -158,8 +159,9 @@ impl Stream for FsStream {
|
|||
}
|
||||
|
||||
impl From<UpstreamError> for actix_web::Error {
|
||||
#[inline]
|
||||
fn from(_: UpstreamError) -> Self {
|
||||
todo!()
|
||||
HttpResponse::BadGateway().finish().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -245,7 +245,12 @@ async fn fetch_image(
|
|||
let (stream, metadata) = {
|
||||
match cache.lock().put(key, Box::new(body), metadata).await {
|
||||
Ok((stream, metadata)) => (stream, *metadata),
|
||||
Err(_) => todo!(),
|
||||
Err(e) => {
|
||||
warn!("Failed to insert into cache: {}", e);
|
||||
return ServerResponse::HttpResponse(
|
||||
HttpResponse::InternalServerError().finish(),
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue