more error logging
This commit is contained in:
parent
11925f8c4f
commit
5c556a0803
|
@ -208,10 +208,10 @@ fn handle_connection(mut stream: TcpStream) {
|
|||
.reduce(|a, b| format!("{}\n{}", b, a))
|
||||
.unwrap()
|
||||
}
|
||||
// .reduce(|i, x| format!("{}\n{}", i, x))
|
||||
// .unwrap()
|
||||
// .to_string(),
|
||||
Err(e) => format!("HTTP/1.1 500\r\n\r\n{}", e),
|
||||
Err(e) => {
|
||||
eprintln!("\x1b[0;31mError when fetching list of posts: {e:?}\x1b[0m");
|
||||
format!("HTTP/1.1 500\r\n\r\n{}", e)
|
||||
},
|
||||
}
|
||||
}
|
||||
.as_bytes(),
|
||||
|
|
Loading…
Reference in a new issue