central nginx manager

This commit is contained in:
Ned Wright
2025-01-13 12:35:42 +00:00
parent 35b2df729f
commit 6db87fc7fe
45 changed files with 390 additions and 130 deletions

View File

@@ -94,10 +94,13 @@ string
HTTPResponse::toString() const
{
auto code = status_code_to_string.find(status_code);
dbgAssert(code != status_code_to_string.end())
<< AlertInfo(AlertTeam::CORE, "messaging i/s")
<< "Unknown status code "
<< int(status_code);
if (code == status_code_to_string.end()) {
dbgAssertOpt(code != status_code_to_string.end())
<< AlertInfo(AlertTeam::CORE, "messaging i/s")
<< "Unknown status code "
<< int(status_code);
return "[Status-code]: 500 - HTTP_INTERNAL_SERVER_ERROR, [Body]: " + (body.empty() ? "{}" : body);
}
return "[Status-code]: " + code->second + ", [Body]: " + (body.empty() ? "{}" : body);
}