Log to WARNING HTTP internal server errors.

This commit is contained in:
levlam 2022-02-02 01:13:11 +03:00
parent 02b99d0fbf
commit 9e96126b87

View File

@ -128,7 +128,11 @@ void HttpConnectionBase::loop() {
} }
live_event(); live_event();
state_ = State::Write; state_ = State::Write;
LOG(INFO) << res.error(); if (res.error().code() == 500) {
LOG(WARNING) << "Failed to process an HTTP query:" << res.error();
} else {
LOG(INFO) << res.error();
}
HttpHeaderCreator hc; HttpHeaderCreator hc;
hc.init_status_line(res.error().code()); hc.init_status_line(res.error().code());
hc.set_content_size(0); hc.set_content_size(0);