fix panic when error is returned from SubmitReport (#1640)

Signed-off-by: Amir Malka <amirm@armosec.io>
This commit is contained in:
Amir Malka
2024-03-17 14:08:04 +02:00
committed by GitHub
parent 337fb96e3f
commit 56a9d9a7f3

View File

@@ -249,7 +249,7 @@ func (report *ReportEventReceiver) sendReport(postureReport *reporthandlingv2.Po
report.tenantConfig.DeleteCredentials()
}
return fmt.Errorf("%s, %v:%s", report.getReportUrl(), err, strResponse)
return fmt.Errorf("%w:%s", err, strResponse)
}
// message is taken only from last report