feat: add heartbeat check for bug report API and enhance logging throughout the application

This commit is contained in:
Flavio Fois
2026-02-16 08:54:29 +01:00
parent 894e8d9e51
commit 828adcfcc2
15 changed files with 312 additions and 26 deletions

View File

@@ -249,14 +249,19 @@ External IP: %s
FolderPath: bugReportFolder,
}
// Attempt to upload to the bug report API server
reportID, uploadErr := a.UploadBugReport(bugReportFolder, input)
if uploadErr != nil {
Log("Bug report upload failed (falling back to local zip):", uploadErr)
result.UploadError = uploadErr.Error()
// Attempt to upload to the bug report API server (only if reachable)
if !a.CheckBugReportAPI() {
Log("Bug report API is offline, skipping upload")
result.UploadError = "Bug report API is offline"
} else {
result.Uploaded = true
result.ReportID = reportID
reportID, uploadErr := a.UploadBugReport(bugReportFolder, input)
if uploadErr != nil {
Log("Bug report upload failed (falling back to local zip):", uploadErr)
result.UploadError = uploadErr.Error()
} else {
result.Uploaded = true
result.ReportID = reportID
}
}
return result, nil