{"record":{"id":"6512fe9621921d65","repo":"multica-ai/multica","slug":"custom-env-file-path-must-not-be-empty","errorCode":null,"errorMessage":"--custom-env-file: path must not be empty","messagePattern":"--custom-env-file: path must not be empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_agent.go","lineNumber":1280,"sourceCode":"\t\treturn nil, false, fmt.Errorf(\"--custom-env, --custom-env-stdin, and --custom-env-file are mutually exclusive; pick one\")\n\t}\n\n\tvar raw string\n\tswitch {\n\tcase inline:\n\t\traw, _ = cmd.Flags().GetString(\"custom-env\")\n\tcase fromStdin:\n\t\tbuf, err := io.ReadAll(cmd.InOrStdin())\n\t\tif err != nil {\n\t\t\treturn nil, false, fmt.Errorf(\"read --custom-env-stdin: %w\", err)\n\t\t}\n\t\traw = string(buf)\n\t\tif strings.TrimSpace(raw) == \"\" {\n\t\t\treturn nil, false, fmt.Errorf(\"--custom-env-stdin: empty input; pass '{}' to clear\")\n\t\t}\n\tcase fromFile:\n\t\tif filePath == \"\" {\n\t\t\treturn nil, false, fmt.Errorf(\"--custom-env-file: path must not be empty\")\n\t\t}\n\t\tbuf, err := os.ReadFile(filePath)\n\t\tif err != nil {\n\t\t\t// Filesystem errors may include the path but not the contents —\n\t\t\t// safe to surface via %w.\n\t\t\treturn nil, false, fmt.Errorf(\"read --custom-env-file: %w\", err)\n\t\t}\n\t\traw = string(buf)\n\t\tif strings.TrimSpace(raw) == \"\" {\n\t\t\treturn nil, false, fmt.Errorf(\"--custom-env-file %q: empty contents; pass '{}' to clear\", filePath)\n\t\t}\n\t}\n\n\tce, err := parseCustomEnv(raw)\n\tif err != nil {\n\t\treturn nil, false, err\n\t}\n\treturn ce, true, nil","sourceCodeStart":1262,"sourceCodeEnd":1298,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_agent.go#L1262-L1298","documentation":"Error \"--custom-env-file: path must not be empty\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_agent.go:1280 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a non-empty path for --custom-env-file."],"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"}