{"record":{"id":"d5613646ddba0e2d","repo":"slimtoolkit/slim","slug":"saving-reports-failed-w","errorCode":null,"errorMessage":"saving reports failed: %w","messagePattern":"saving reports failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/app/sensor/controlled/controlled.go","lineNumber":256,"sourceCode":"\t}\n\n\tlog.Info(\"sensor: composite monitor is done, checking status...\")\n\n\treport, err := mon.Status()\n\tif err != nil {\n\t\tlog.WithError(err).Error(\"sensor: composite monitor failed\")\n\t\treturn fmt.Errorf(\"composite monitor failed: %w\", err)\n\t}\n\n\tif err := s.artifactor.Process(\n\t\tmon.StartCommand(),\n\t\ts.mountPoint,\n\t\treport.PeReport,\n\t\treport.FanReport,\n\t\treport.PtReport,\n\t); err != nil {\n\t\tlog.WithError(err).Error(\"sensor: artifact.Process() failed\")\n\t\treturn fmt.Errorf(\"saving reports failed: %w\", err)\n\t}\n\treturn nil // Clean exit\n}\n","sourceCodeStart":238,"sourceCodeEnd":260,"githubUrl":"https://github.com/slimtoolkit/slim/blob/81940d17fa112cc678e32209214bcb2355cb3004/pkg/app/sensor/controlled/controlled.go#L238-L260","documentation":"After a successful monitor status, processMonitoringResults calls s.artifactor.Process(...) to persist the PE, fan and Pt reports. If artifactor.Process fails, the error is wrapped with 'saving reports failed'. Monitoring data was collected but could not be saved/processed.","triggerScenarios":"artifactor.Process returns an error while writing reports — disk full, unwritable artifact directory, failure processing report content.","commonSituations":"Disk exhaustion on the artifact volume, permission issues after env prep, malformed report data from a sub-monitor.","solutions":["Check the wrapped error from artifactor.Process","Verify the artifacts output directory is writable and has free space","Validate report contents (PeReport/FanReport/PtReport) are not nil/corrupt before processing"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// pre-flight disk space check on artifacts volume\nif st, err := os.Stat(artifactsDir); err == nil {\n\t// ensure writable: attempt temp file create\n\tf, err := os.CreateTemp(artifactsDir, \"wtest\")\n\tif err != nil { log.Fatalf(\"artifacts dir not writable: %v\", err) }\n\tf.Close(); os.Remove(f.Name())\n}","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"saving reports failed\") {\n\t// check disk full / permissions; reports may be recoverable from monitor memory\n}","preventionTips":["Enforce free-space thresholds on the artifacts volume","Keep artifacts dir writable by the sensor user","Validate sub-monitor reports are populated before Process"],"tags":["go","sensor","artifacts","reporting"],"backgroundTag":"report-save-failed","analyzedSha":"81940d17fa112cc678e32209214bcb2355cb3004","analyzedAt":"2026-08-31T23:06:12.682Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}