Skip to content

Commit 3239ee2

Browse files
authored
feat(hosted): Add error logs if HTTP fails (#12091)
1 parent a850760 commit 3239ee2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libraries/ESP_HostedOTA/src/ESP_HostedOTA.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ bool updateEspHostedSlave() {
143143
// Step 15: Clean up allocated buffer
144144
free(buff);
145145
Serial.println();
146+
} else if (httpCode == HTTP_CODE_NOT_FOUND) {
147+
Serial.println("ERROR: Update file not found!");
148+
} else {
149+
Serial.printf("ERROR: HTTP request failed with code %d!", httpCode);
146150
}
147151

148152
// Step 16: Close HTTP connection

0 commit comments

Comments
 (0)