diff options
author | boastful-squirrel <boastful.squirrel@gmail.com> | 2019-04-21 17:21:59 +0000 |
---|---|---|
committer | boastful-squirrel <boastful.squirrel@gmail.com> | 2019-04-21 17:21:59 +0000 |
commit | 23567f3b73ef309ba9afda51e084751b64942c53 (patch) | |
tree | faff10f423fdb4fa5ef0d22c94eafd18bfe76500 /src/listing.rs | |
parent | Rework error system + avoid panics in main() (diff) | |
download | miniserve-23567f3b73ef309ba9afda51e084751b64942c53.tar.gz miniserve-23567f3b73ef309ba9afda51e084751b64942c53.zip |
Print upload/archive errors also in terminal
Diffstat (limited to 'src/listing.rs')
-rw-r--r-- | src/listing.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/listing.rs b/src/listing.rs index a9e4f5f..4473c6d 100644 --- a/src/listing.rs +++ b/src/listing.rs @@ -261,9 +261,12 @@ pub fn directory_listing<S>( .chunked() .body(Body::Streaming(Box::new(once(Ok(content)))))) } - Err(err) => Ok(HttpResponse::Ok() - .status(http::StatusCode::INTERNAL_SERVER_ERROR) - .body(err.to_string())), + Err(err) => { + log::error!("{}", &err); + Ok(HttpResponse::Ok() + .status(http::StatusCode::INTERNAL_SERVER_ERROR) + .body(err.to_string())) + } } } else { Ok(HttpResponse::Ok() |