Feature: Check for out of memory situations when sending json responses

Also shows a nice message in the frontend if an internal error occours
This commit is contained in:
Thomas Basler
2024-04-04 20:43:07 +02:00
parent 2e3125fe8d
commit 980e847ccb
26 changed files with 171 additions and 229 deletions

View File

@@ -39,6 +39,7 @@ public:
static void writeConfig(JsonVariant& retMsg, const WebApiError code = WebApiError::GenericSuccess, const String& message = "Settings saved!");
static bool parseRequestData(AsyncWebServerRequest* request, AsyncJsonResponse* response, JsonDocument& json_document);
static bool sendJsonResponse(AsyncWebServerRequest* request, AsyncJsonResponse* response, const char* function, const uint16_t line);
private:
AsyncWebServer _server;