Additional error handling improvements

This commit is contained in:
Erik Olof Gunnar Andersson 2024-10-23 18:31:49 +02:00
parent 953c9e1f02
commit 2fdbbd3641

View File

@ -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;
}