log error for 500 internal server error during 'listen'

main
_ 2021-03-16 14:39:15 +00:00
parent 456ab04f78
commit 62821c546b
1 changed files with 4 additions and 1 deletions

View File

@ -126,7 +126,10 @@ pub async fn handle_listen (
Ok (ok_reply (rmp_serde::to_vec (&vec! [one_req])?)?)
},
Ok (Err (ShuttingDownError::ShuttingDown)) => Ok (error_reply (StatusCode::SERVICE_UNAVAILABLE, "Server is shutting down, try again soon")?),
Err (_) => Ok (error_reply (StatusCode::INTERNAL_SERVER_ERROR, "Server error")?),
Err (e) => {
error! ("{}", e);
Ok (error_reply (StatusCode::INTERNAL_SERVER_ERROR, "Server error")?)
},
},
_ = tokio::time::sleep (Duration::from_secs (30)).fuse () => {
trace! ("Timed out http_listen for server {}", watcher_code);