{"record":{"id":"3528335fb02b6cd3","repo":"vxcontrol/pentagi","slug":"resources-notfound","errorCode":"Resources.NotFound","errorMessage":"resource %q not found","messagePattern":"resource %q not found","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"backend/pkg/server/services/resources.go","lineNumber":625,"sourceCode":"\t\t}\n\t\tsrcPaths = append(srcPaths, sp)\n\t}\n\n\t// ── Route to single-source or multi-source path ───────────────────────────\n\tvar result moveResourceResult\n\tif len(srcPaths) == 1 {\n\t\tsrcPath := srcPaths[0]\n\t\t// When destination is root (\"\"), the effective target is <root>/<src.Name>.\n\t\t// A source already living at root would land on itself — catch it early.\n\t\tdstIsDirHint := dstPath == \"\" || pathHasTrailingSeparator(req.Destination)\n\t\tif srcPath == dstPath || (dstPath == \"\" && !strings.Contains(srcPath, \"/\")) {\n\t\t\tresponse.Error(c, response.ErrResourcesInvalidRequest, errors.New(\"source and destination are the same\"))\n\t\t\treturn\n\t\t}\n\t\tvar src models.UserResource\n\t\tif err := s.db.Where(\"user_id = ? AND path = ?\", uid, srcPath).First(&src).Error; err != nil {\n\t\t\tif gorm.IsRecordNotFoundError(err) {\n\t\t\t\tresponse.Error(c, response.ErrResourcesNotFound, fmt.Errorf(\"resource %q not found\", srcPath))\n\t\t\t\treturn\n\t\t\t}\n\t\t\tlogger.FromContext(c).WithError(err).Error(\"error finding source resource for move\")\n\t\t\tresponse.Error(c, response.ErrInternal, err)\n\t\t\treturn\n\t\t}\n\t\tresult, err = s.moveResource(uid, src, srcPath, dstPath, req.Force, dstIsDirHint)\n\t} else {\n\t\tresult, err = s.moveMultipleSources(uid, srcPaths, dstPath, req.Force)\n\t}\n\n\tif err != nil {\n\t\tswitch {\n\t\tcase errors.Is(err, errResourceInvalid):\n\t\t\tresponse.Error(c, response.ErrResourcesInvalidRequest, err)\n\t\tcase errors.Is(err, errResourceConflict):\n\t\t\tresponse.Error(c, response.ErrResourcesConflict, err)\n\t\tcase errors.Is(err, errResourceNotFound):","sourceCodeStart":607,"sourceCodeEnd":643,"githubUrl":"https://github.com/vxcontrol/pentagi/blob/ea665308baaff015b226f308438a68d929d0f29b/backend/pkg/server/services/resources.go#L607-L643","documentation":"Error \"resource %q not found\" thrown in vxcontrol/pentagi.","triggerScenarios":"Thrown at backend/pkg/server/services/resources.go:625 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"}