Skip to content

Commit f732e66

Browse files
committed
Display nina error code as provided by the WiFiStorage.downloadOTA API
1 parent 00e46c7 commit f732e66

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ArduinoIoTCloudTCP.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -446,9 +446,10 @@ void ArduinoIoTCloudTCP::onOTARequest()
446446
WiFiStorage.remove("/fs/UPDATE.BIN.LZSS.TMP");
447447

448448
/* Trigger direct download to nina module. */
449-
if (!WiFiStorage.downloadOTA(_ota_url.c_str()))
449+
uint8_t nina_ota_err_code = 0;
450+
if (!WiFiStorage.downloadOTA(_ota_url.c_str(), &nina_ota_err_code))
450451
{
451-
DBG_ERROR("ArduinoIoTCloudTCP::%s download to NiNa failed", __FUNCTION__, _ota_req ? "true" : "false");
452+
DBG_ERROR("ArduinoIoTCloudTCP::%s error download to nina: %d", __FUNCTION__, nina_ota_err_code);
452453
_ota_error = static_cast<int>(OTAError::DownloadFailed);
453454
return;
454455
}

0 commit comments

Comments
 (0)