vxcontrol/pentagi · error
%w: two sources both target %q
Error message
%w: two sources both target %q
What it means
Error "%w: two sources both target %q" thrown in vxcontrol/pentagi.
Source
Thrown at backend/pkg/server/services/flow_files.go:1907
if relErr != nil {
return fmt.Errorf("relative path: %w", relErr)
}
sanitized, sanitizeErr := resources.SanitizeResourcePath(
src.destPath + "/" + filepath.ToSlash(rel),
)
if sanitizeErr != nil {
log.WithError(sanitizeErr).Warnf("skipping unsafe file name %q", rel)
return nil
}
virtPath = sanitized
} else {
virtPath = src.destPath
}
// Within-batch collision check: two sources mapping to the same
// virtual destination path is always an error.
if seenVPaths[virtPath] {
return fmt.Errorf("%w: two sources both target %q", errResourceConflict, virtPath)
}
seenVPaths[virtPath] = true
// Phase 1 conflict pre-check: avoid IO when the destination
// obviously conflicts. Phase 3 re-checks inside the TX.
if !force {
_, exists, dbErr := findResourceByPath(s.db, uid, virtPath)
if dbErr != nil {
return fmt.Errorf("checking %s: %w", virtPath, dbErr)
}
if exists {
return fmt.Errorf("%w: resource already exists at %q", errResourceConflict, virtPath)
}
}
f, openErr := os.Open(filePath)
if openErr != nil {
return fmt.Errorf("open %s: %w", filePath, openErr)View on GitHub (pinned to ea665308ba)
When it happens
Trigger: Thrown at backend/pkg/server/services/flow_files.go:1907 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of vxcontrol/pentagi@ea665308ba (2026-09-01).
Data as JSON: /api/errors/ce11b3e07fc2a725.
Report an issue: GitHub.