vxcontrol/pentagi · error

save temp for %s: %w

Error message

save temp for %s: %w

What it means

Error "save temp for %s: %w" thrown in vxcontrol/pentagi.

Source

Thrown at backend/pkg/server/services/flow_files.go:1930

			// 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)
			}
			tmpPath, hash, size, saveErr := resources.SaveToTemp(f, blobsDir)
			f.Close()
			if saveErr != nil {
				return fmt.Errorf("save temp for %s: %w", filePath, saveErr)
			}
			pending = append(pending, pendingResourceUpload{
				name:    path.Base(virtPath),
				vPath:   virtPath,
				tmpPath: tmpPath,
				hash:    hash,
				size:    size,
			})
			return nil
		})
		if walkErr != nil {
			cleanupResourceUploads(pending)
			if errors.Is(walkErr, errResourceConflict) {
				response.Error(c, response.ErrFlowFilesAlreadyExists, walkErr)
			} else {
				log.WithError(walkErr).Errorf("error reading source files for promotion")
				response.Error(c, response.ErrInternal, walkErr)
			}

View on GitHub (pinned to ea665308ba)

When it happens

Trigger: Thrown at backend/pkg/server/services/flow_files.go:1930 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/399486c35a3e47c2. Report an issue: GitHub.