handle case where WWN not detected for a device (print error messages, but skip device collection & uploading).

This commit is contained in:
Jason Kulatunga
2022-05-05 23:03:06 -07:00
parent 3dbe59781c
commit fabc629e40
3 changed files with 11 additions and 1 deletions
@@ -31,7 +31,7 @@ func UploadDeviceMetrics(c *gin.Context) {
//update the device information if necessary
updatedDevice, err := deviceRepo.UpdateDevice(c, c.Param("wwn"), collectorSmartData)
if err != nil {
logger.Errorln("An error occurred while updating device data from smartctl metrics", err)
logger.Errorln("An error occurred while updating device data from smartctl metrics:", err)
c.JSON(http.StatusInternalServerError, gin.H{"success": false})
return
}