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))
|
.reduce(|a, b| format!("{}\n{}", b, a))
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
// .reduce(|i, x| format!("{}\n{}", i, x))
|
Err(e) => {
|
||||||
// .unwrap()
|
eprintln!("\x1b[0;31mError when fetching list of posts: {e:?}\x1b[0m");
|
||||||
// .to_string(),
|
format!("HTTP/1.1 500\r\n\r\n{}", e)
|
||||||
Err(e) => format!("HTTP/1.1 500\r\n\r\n{}", e),
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.as_bytes(),
|
.as_bytes(),
|
||||||
|
|
Loading…
Reference in a new issue