vxcontrol/pentagi · error

Resources.AlreadyExists

Resources.AlreadyExists

Error message

resource %q is duplicated in upload request

What it means

Error "resource %q is duplicated in upload request" thrown in vxcontrol/pentagi.

Source

Thrown at backend/pkg/server/services/resources.go:321

		if fh.Size < 0 {
			cleanupResourceUploads(pendingList)
			response.Error(c, response.ErrResourcesInvalidRequest,
				fmt.Errorf("file %q has invalid size %d", name, fh.Size))
			return
		}
		totalSize += fh.Size
		if totalSize > resources.MaxUploadTotalSize {
			cleanupResourceUploads(pendingList)
			response.Error(c, response.ErrResourcesInvalidRequest,
				fmt.Errorf("total upload size exceeds the limit of %d bytes", resources.MaxUploadTotalSize))
			return
		}

		vPath := resources.FilePath(dirPath, name)
		if _, ok := seenPaths[vPath]; ok {
			cleanupResourceUploads(pendingList)
			response.Error(c, response.ErrResourcesAlreadyExists,
				fmt.Errorf("resource %q is duplicated in upload request", vPath))
			return
		}
		seenPaths[vPath] = struct{}{}

		exists, err := s.resourceExists(uid, vPath)
		if err != nil {
			cleanupResourceUploads(pendingList)
			logger.FromContext(c).WithError(err).Error("error checking resource existence")
			response.Error(c, response.ErrInternal, err)
			return
		}
		if exists {
			cleanupResourceUploads(pendingList)
			response.Error(c, response.ErrResourcesAlreadyExists,
				fmt.Errorf("resource %q already exists", vPath))
			return
		}

View on GitHub (pinned to ea665308ba)

When it happens

Trigger: Thrown at backend/pkg/server/services/resources.go:321 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/907aa11c2fe7979b. Report an issue: GitHub.