{"record":{"id":"0c0758a6c3a3b3d6","repo":"vxcontrol/pentagi","slug":"checking-s-w","errorCode":null,"errorMessage":"checking %s: %w","messagePattern":"checking (.+?): %w","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"backend/pkg/server/services/flow_files.go","lineNumber":1916,"sourceCode":"\t\t\t\t}\n\t\t\t\tvirtPath = sanitized\n\t\t\t} else {\n\t\t\t\tvirtPath = src.destPath\n\t\t\t}\n\n\t\t\t// Within-batch collision check: two sources mapping to the same\n\t\t\t// virtual destination path is always an error.\n\t\t\tif seenVPaths[virtPath] {\n\t\t\t\treturn fmt.Errorf(\"%w: two sources both target %q\", errResourceConflict, virtPath)\n\t\t\t}\n\t\t\tseenVPaths[virtPath] = true\n\n\t\t\t// Phase 1 conflict pre-check: avoid IO when the destination\n\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,","sourceCodeStart":1898,"sourceCodeEnd":1934,"githubUrl":"https://github.com/vxcontrol/pentagi/blob/ea665308baaff015b226f308438a68d929d0f29b/backend/pkg/server/services/flow_files.go#L1898-L1934","documentation":"Error \"checking %s: %w\" thrown in vxcontrol/pentagi.","triggerScenarios":"Thrown at backend/pkg/server/services/flow_files.go:1916 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-08T10:18:20.063Z"}