{"record":{"id":"5254c6a22cf608cf","repo":"multica-ai/multica","slug":"config-value-q-for-s-must-be-positive","errorCode":null,"errorMessage":"config value %q for %s must be positive","messagePattern":"config value %q for (.+?) must be positive","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_daemon.go","lineNumber":1677,"sourceCode":"// resolveDaemonDurationOverride is the numeric counterpart for\n// poll_interval. flagValue > 0 wins; otherwise, if the env var is unset\n// we parse cfgValue. Parse errors and non-positive values are surfaced\n// so a bad config.json value doesn't silently fall through to the\n// default — `config set` already rejects the same shapes at write\n// time, and this guard catches legacy configs that predate that check.\nfunc resolveDaemonDurationOverride(flagValue time.Duration, envName, cfgValue string) (time.Duration, error) {\n\tif flagValue > 0 {\n\t\treturn flagValue, nil\n\t}\n\tif !envUnset(envName) || cfgValue == \"\" {\n\t\treturn 0, nil\n\t}\n\tparsed, err := time.ParseDuration(cfgValue)\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"config value %q for %s is not a valid duration: %w\", cfgValue, envName, err)\n\t}\n\tif parsed <= 0 {\n\t\treturn 0, fmt.Errorf(\"config value %q for %s must be positive\", cfgValue, envName)\n\t}\n\treturn parsed, nil\n}\n\n// resolveDaemonIntOverride is the max_concurrent_tasks counterpart to\n// resolveDaemonStringOverride. flagValue > 0 wins; otherwise the config\n// value applies only when the env var is unset.\nfunc resolveDaemonIntOverride(flagValue int, envName string, cfgValue int) int {\n\tif flagValue > 0 {\n\t\treturn flagValue\n\t}\n\tif !envUnset(envName) {\n\t\treturn 0\n\t}\n\tif cfgValue > 0 {\n\t\treturn cfgValue\n\t}\n\treturn 0","sourceCodeStart":1659,"sourceCodeEnd":1695,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_daemon.go#L1659-L1695","documentation":"Error \"config value %q for %s must be positive\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_daemon.go:1677 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the config value to a positive duration."],"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"}