fix logging for out of ressources
This commit is contained in:
parent
a758d894f6
commit
1caeb1d88b
@ -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");
|
||||
|
||||
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user