{"record":{"id":"399486c35a3e47c2","repo":"vxcontrol/pentagi","slug":"save-temp-for-s-w","errorCode":null,"errorMessage":"save temp for %s: %w","messagePattern":"save temp for (.+?): %w","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"backend/pkg/server/services/flow_files.go","lineNumber":1930,"sourceCode":"\t\t\t// obviously conflicts. Phase 3 re-checks inside the TX.\n\t\t\tif !force {\n\t\t\t\t_, exists, dbErr := findResourceByPath(s.db, uid, virtPath)\n\t\t\t\tif dbErr != nil {\n\t\t\t\t\treturn fmt.Errorf(\"checking %s: %w\", virtPath, dbErr)\n\t\t\t\t}\n\t\t\t\tif exists {\n\t\t\t\t\treturn fmt.Errorf(\"%w: resource already exists at %q\", errResourceConflict, virtPath)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tf, openErr := os.Open(filePath)\n\t\t\tif openErr != nil {\n\t\t\t\treturn fmt.Errorf(\"open %s: %w\", filePath, openErr)\n\t\t\t}\n\t\t\ttmpPath, hash, size, saveErr := resources.SaveToTemp(f, blobsDir)\n\t\t\tf.Close()\n\t\t\tif saveErr != nil {\n\t\t\t\treturn fmt.Errorf(\"save temp for %s: %w\", filePath, saveErr)\n\t\t\t}\n\t\t\tpending = append(pending, pendingResourceUpload{\n\t\t\t\tname:    path.Base(virtPath),\n\t\t\t\tvPath:   virtPath,\n\t\t\t\ttmpPath: tmpPath,\n\t\t\t\thash:    hash,\n\t\t\t\tsize:    size,\n\t\t\t})\n\t\t\treturn nil\n\t\t})\n\t\tif walkErr != nil {\n\t\t\tcleanupResourceUploads(pending)\n\t\t\tif errors.Is(walkErr, errResourceConflict) {\n\t\t\t\tresponse.Error(c, response.ErrFlowFilesAlreadyExists, walkErr)\n\t\t\t} else {\n\t\t\t\tlog.WithError(walkErr).Errorf(\"error reading source files for promotion\")\n\t\t\t\tresponse.Error(c, response.ErrInternal, walkErr)\n\t\t\t}","sourceCodeStart":1912,"sourceCodeEnd":1948,"githubUrl":"https://github.com/vxcontrol/pentagi/blob/ea665308baaff015b226f308438a68d929d0f29b/backend/pkg/server/services/flow_files.go#L1912-L1948","documentation":"Error \"save temp for %s: %w\" thrown in vxcontrol/pentagi.","triggerScenarios":"Thrown at backend/pkg/server/services/flow_files.go:1930 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ea665308baaff015b226f308438a68d929d0f29b","analyzedAt":"2026-09-01T14:16:31.421Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}