Skip to content

Commit

Permalink
Additional error handling improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
eandersson committed Oct 23, 2024
1 parent 13389c3 commit b01462a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main/http_server/http_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ static esp_err_t PATCH_update_swarm(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;
Expand Down Expand Up @@ -231,7 +231,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
Expand All @@ -245,7 +245,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;
Expand Down Expand Up @@ -358,7 +358,7 @@ static esp_err_t GET_swarm(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;
}

char * swarm_config = nvs_config_get_string(NVS_CONFIG_SWARM, "[]");
Expand All @@ -375,7 +375,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;
}


Expand Down

0 comments on commit b01462a

Please sign in to comment.