Skip to content

Commit

Permalink
more error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Supersilvia authored and Supersilvia committed Mar 4, 2024
1 parent 25884fb commit a88b352
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/deployable_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,8 @@ void performAutoConfig(AsyncWebServerRequest *request){
debug_printf("esp cam detector name: %s\n",esp_detector_name.c_str());
detector esp_det = get_detector_by_name(endpoint, esp_detector_name.c_str(), apiToken);
if (strcmp(esp_det.id, "NONE") == 0) {
Serial.println("Error: Detector not found. Try connect to the previous configured detector.");
preferences.putString("det_id", "DETECTOR NOT FOUND");
Serial.println("Error: Detector not found.");
return;
}
preferences.putString("det_id", esp_det.id);
Expand Down Expand Up @@ -456,8 +457,7 @@ void performAutoConfig(AsyncWebServerRequest *request){
} else if (metadataDoc.containsKey("Stacklight UUID") && metadataDoc["Stacklight UUID"].isNull()){
preferences.remove("sl_uuid");
}

}
}

#endif

Expand Down

0 comments on commit a88b352

Please sign in to comment.