Fix argparsing error, path in file not found log, panic on invalid args
This commit is contained in:
parent
2040854e82
commit
294c15baa6
3 changed files with 4 additions and 8 deletions
|
|
@ -12,7 +12,7 @@ pub async fn file(file_path: &str, content_type: &str) -> Response<Body> {
|
|||
let content = match std::fs::read(file_path) {
|
||||
Ok(s) => s,
|
||||
Err(e) => {
|
||||
panic!("[file_handler] Failed to read file contents: {e}")
|
||||
panic!("Failed to read {file_path} contents: {e}")
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue