fix logging for out of ressources

This commit is contained in:
helgeerbe 2023-02-23 09:46:24 +01:00
parent a758d894f6
commit 1caeb1d88b
3 changed files with 3 additions and 3 deletions

View File

@ -92,7 +92,7 @@ void WebApiPrometheusClass::onPrometheusMetricsGet(AsyncWebServerRequest* reques
request->send(stream);
}
catch (std::bad_alloc& bad_alloc) {
MessageOutput.printf("Call to /api/prometheus/metrics temporarely out of resources. Reason: \"%s\".", bad_alloc.what());
MessageOutput.printf("Call to /api/prometheus/metrics temporarely out of resources. Reason: \"%s\".\r\n", bad_alloc.what());
auto response = request->beginResponse(429, "text/plain", "Too Many Requests");
response->addHeader("Retry-After", "60");

View File

@ -80,7 +80,7 @@ void WebApiWsLiveClass::loop()
_lastWsPublish = millis();
}
catch (std::bad_alloc& bad_alloc) {
MessageOutput.printf("Call to /api/livedata/status temporarely out of resources. Reason: \"%s\".", bad_alloc.what());
MessageOutput.printf("Call to /api/livedata/status temporarely out of resources. Reason: \"%s\".\r\n", bad_alloc.what());
}
}
}

View File

@ -76,7 +76,7 @@ void WebApiWsVedirectLiveClass::loop()
_lastWsPublish = millis();
}
catch (std::bad_alloc& bad_alloc) {
MessageOutput.printf("Call to /api/vedirectlivedata/status temporarely out of resources. Reason: \"%s\".", bad_alloc.what());
MessageOutput.printf("Call to /api/vedirectlivedata/status temporarely out of resources. Reason: \"%s\".\r\n", bad_alloc.what());
}
}
}