From 2fdbbd3641faad7c340232dd488450250450ab4f Mon Sep 17 00:00:00 2001 From: Erik Olof Gunnar Andersson Date: Wed, 23 Oct 2024 18:31:49 +0200 Subject: [PATCH] Additional error handling improvements --- main/http_server/http_server.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/main/http_server/http_server.c b/main/http_server/http_server.c index 752670e6..ccae503c 100644 --- a/main/http_server/http_server.c +++ b/main/http_server/http_server.c @@ -198,7 +198,7 @@ static esp_err_t handle_options_request(httpd_req_t * req) // Set CORS headers for OPTIONS request if (set_cors_headers(req) != ESP_OK) { httpd_resp_send_500(req); - return ESP_FAIL; + return ESP_OK; } // Send a blank response for OPTIONS request @@ -212,7 +212,7 @@ static esp_err_t PATCH_update_settings(httpd_req_t * req) // Set CORS headers if (set_cors_headers(req) != ESP_OK) { httpd_resp_send_500(req); - return ESP_FAIL; + return ESP_OK; } int total_len = req->content_len; @@ -318,7 +318,6 @@ static esp_err_t POST_restart(httpd_req_t * req) return ESP_OK; } - /* Simple handler for getting system handler */ static esp_err_t GET_system_info(httpd_req_t * req) { @@ -327,7 +326,7 @@ static esp_err_t GET_system_info(httpd_req_t * req) // Set CORS headers if (set_cors_headers(req) != ESP_OK) { httpd_resp_send_500(req); - return ESP_FAIL; + return ESP_OK; }