{"record":{"id":"6a4b6d09fcf3c596","repo":"multica-ai/multica","slug":"resolve-profile-dir-w","errorCode":null,"errorMessage":"resolve profile dir: %w","messagePattern":"resolve profile dir: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/cli/config.go","lineNumber":242,"sourceCode":"\tif profile == \"\" {\n\t\tif taskLocal {\n\t\t\treturn filepath.Join(root, \"config.json\"), nil\n\t\t}\n\t\treturn filepath.Join(root, defaultCLIConfigPath), nil\n\t}\n\tif taskLocal {\n\t\treturn filepath.Join(root, \"profiles\", profile, \"config.json\"), nil\n\t}\n\treturn filepath.Join(root, \".multica\", \"profiles\", profile, \"config.json\"), nil\n}\n\n// ProfileDir returns the base directory for a profile's state files (pid, log).\n// An empty profile returns ~/.multica/. A named profile returns ~/.multica/profiles/<name>/.\n// Task invocations resolve the equivalent paths below TaskConfigRootEnv.\nfunc ProfileDir(profile string) (string, error) {\n\troot, taskLocal, err := multicaConfigRoot()\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"resolve profile dir: %w\", err)\n\t}\n\tif taskLocal {\n\t\tif err := validateTaskLocalProfile(profile); err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"resolve profile dir: %w\", err)\n\t\t}\n\t}\n\tif profile == \"\" {\n\t\tif taskLocal {\n\t\t\treturn root, nil\n\t\t}\n\t\treturn filepath.Join(root, \".multica\"), nil\n\t}\n\tif taskLocal {\n\t\treturn filepath.Join(root, \"profiles\", profile), nil\n\t}\n\treturn filepath.Join(root, \".multica\", \"profiles\", profile), nil\n}\n","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/cli/config.go#L224-L260","documentation":"Error \"resolve profile dir: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/cli/config.go:242 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the profile directory path configuration and permissions."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}