diff --git a/src/common/restapi/http/SecureServerConnection.h b/src/common/restapi/http/SecureServerConnection.h index 801fdc0e..97c5b14f 100644 --- a/src/common/restapi/http/SecureServerConnection.h +++ b/src/common/restapi/http/SecureServerConnection.h @@ -197,9 +197,12 @@ namespace restapi } } catch(const std::exception& e) { - ::LogError(LOG_REST, "SecureServerConnection::read(), %s", ec.message().c_str()); + ::LogError(LOG_REST, "SecureServerConnection::read(), %s %s", e.what(), ec.message().c_str()); m_continue = false; m_contResult = HTTPLexer::INDETERMINATE; + + m_reply = HTTPPayload::statusPayload(HTTPPayload::INTERNAL_SERVER_ERROR); + write(); } } else if (ec != asio::error::operation_aborted) { diff --git a/src/common/restapi/http/ServerConnection.h b/src/common/restapi/http/ServerConnection.h index 98bbf2bc..df7c2ac1 100644 --- a/src/common/restapi/http/ServerConnection.h +++ b/src/common/restapi/http/ServerConnection.h @@ -180,9 +180,12 @@ namespace restapi } } catch(const std::exception& e) { - ::LogError(LOG_REST, "ServerConnection::read(), %s", ec.message().c_str()); + ::LogError(LOG_REST, "ServerConnection::read(), %s %s", e.what(), ec.message().c_str()); m_continue = false; m_contResult = HTTPLexer::INDETERMINATE; + + m_reply = HTTPPayload::statusPayload(HTTPPayload::INTERNAL_SERVER_ERROR); + write(); } } else if (ec != asio::error::operation_aborted) {