vxcontrol/pentagi · error
Resources.InvalidRequest
Resources.InvalidRequest
Error message
too many files: %d exceeds the limit of %d
What it means
Error "too many files: %d exceeds the limit of %d" thrown in vxcontrol/pentagi.
Source
Thrown at backend/pkg/server/services/resources.go:273
if err != nil {
logger.FromContext(c).WithError(err).Error("error reading multipart form for resources upload")
response.Error(c, response.ErrResourcesInvalidRequest, err)
return
}
fileHeaders := multipartForm.File["files"]
if len(fileHeaders) == 0 {
if fh, ferr := c.FormFile("file"); ferr == nil && fh != nil {
fileHeaders = append(fileHeaders, fh)
}
}
if len(fileHeaders) == 0 {
response.Error(c, response.ErrResourcesInvalidRequest, errors.New("at least one file is required"))
return
}
if len(fileHeaders) > resources.MaxUploadFiles {
response.Error(c, response.ErrResourcesInvalidRequest,
fmt.Errorf("too many files: %d exceeds the limit of %d", len(fileHeaders), resources.MaxUploadFiles))
return
}
if err := resources.EnsureResourcesDir(s.dataDir); err != nil {
logger.FromContext(c).WithError(err).Error("failed to ensure resources directory")
response.Error(c, response.ErrInternal, err)
return
}
blobsDir := resources.ResourcesDir(s.dataDir)
var totalSize int64
pendingList := make([]pendingResourceUpload, 0, len(fileHeaders))
seenPaths := make(map[string]struct{}, len(fileHeaders))
// Phase 1: validate, stream to tmp, compute MD5.
for _, fh := range fileHeaders {
name, err := resources.SanitizeResourceFileName(fh.Filename)
if err != nil {View on GitHub (pinned to ea665308ba)
When it happens
Trigger: Thrown at backend/pkg/server/services/resources.go:273 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/f9fb973eda84dc05.
Report an issue: GitHub.