{"record":{"id":"e496a46625e01cc0","repo":"vxcontrol/pentagi","slug":"flowfiles-invaliddata","errorCode":"FlowFiles.InvalidData","errorMessage":"source %q must be a regular file or a directory","messagePattern":"source %q must be a regular file or a directory","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"error","filePath":"backend/pkg/server/services/flow_files.go","lineNumber":1798,"sourceCode":"\t\t\tlogger.FromContext(c).WithError(resolveErr).Errorf(\"invalid source path %q\", rawSrc)\n\t\t\tresponse.Error(c, response.ErrFlowFilesInvalidData, resolveErr)\n\t\t\treturn\n\t\t}\n\n\t\tinfo, statErr := os.Lstat(absPath)\n\t\tif statErr != nil {\n\t\t\tif os.IsNotExist(statErr) {\n\t\t\t\tresponse.Error(c, response.ErrFlowFilesNotFound, statErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tlogger.FromContext(c).WithError(statErr).Errorf(\"error stating flow source %q\", rawSrc)\n\t\t\tresponse.Error(c, response.ErrInternal, statErr)\n\t\t\treturn\n\t\t}\n\t\tif !info.IsDir() && !info.Mode().IsRegular() {\n\t\t\t// Reject symlinks and other special files.\n\t\t\tresponse.Error(c, response.ErrFlowFilesInvalidData,\n\t\t\t\tfmt.Errorf(\"source %q must be a regular file or a directory\", rawSrc))\n\t\t\treturn\n\t\t}\n\n\t\tvar entryDest string\n\t\tif multiSource {\n\t\t\t// Multi-source: each entry lands under destination/<basename>.\n\t\t\tbaseName := path.Base(absPath)\n\t\t\tvar sanitizeErr error\n\t\t\tentryDest, sanitizeErr = resources.SanitizeResourcePath(destPath + \"/\" + baseName)\n\t\t\tif sanitizeErr != nil {\n\t\t\t\tlogger.FromContext(c).WithError(sanitizeErr).Errorf(\"invalid derived destination for source %q\", rawSrc)\n\t\t\t\tresponse.Error(c, response.ErrFlowFilesInvalidData, sanitizeErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t} else {\n\t\t\t// Single source: destination is used exactly as specified.\n\t\t\tentryDest = destPath\n\t\t}","sourceCodeStart":1780,"sourceCodeEnd":1816,"githubUrl":"https://github.com/vxcontrol/pentagi/blob/ea665308baaff015b226f308438a68d929d0f29b/backend/pkg/server/services/flow_files.go#L1780-L1816","documentation":"Error \"source %q must be a regular file or a directory\" thrown in vxcontrol/pentagi.","triggerScenarios":"Thrown at backend/pkg/server/services/flow_files.go:1798 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"}