aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorboastful-squirrel <boastful.squirrel@gmail.com>2019-04-21 14:00:47 +0000
committerboastful-squirrel <boastful.squirrel@gmail.com>2019-04-21 14:00:47 +0000
commit3234ba71d2f5a7aa30065fb9e74216a09fce1464 (patch)
tree7e79887cd62fb56c5e276b1ef5bd15894f7db771 /src
parentImproved upload error display (diff)
downloadminiserve-3234ba71d2f5a7aa30065fb9e74216a09fce1464.tar.gz
miniserve-3234ba71d2f5a7aa30065fb9e74216a09fce1464.zip
Print error on the web page rather than on the terminal
Diffstat (limited to 'src')
-rw-r--r--src/listing.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/listing.rs b/src/listing.rs
index 6aa1eac..ccb188c 100644
--- a/src/listing.rs
+++ b/src/listing.rs
@@ -10,7 +10,6 @@ use std::time::SystemTime;
use strum_macros::{Display, EnumString};
use crate::archive;
-use crate::errors;
use crate::renderer;
use crate::themes;
@@ -263,10 +262,9 @@ pub fn directory_listing<S>(
.body(Body::Streaming(Box::new(once(Ok(content))))))
}
Err(err) => {
- errors::print_error_chain(err);
Ok(HttpResponse::Ok()
.status(http::StatusCode::INTERNAL_SERVER_ERROR)
- .body(""))
+ .body(err.to_string()))
}
}
} else {