{"record":{"id":"0aa7ff262a199784","repo":"eyaltoledano/claude-task-master","slug":"invalid-value-for-mapping-env-value","errorCode":null,"errorMessage":"Invalid value for ${mapping.env}: ${value}","messagePattern":"Invalid value for (.+?): (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/tm-core/src/modules/config/services/environment-config-provider.service.ts","lineNumber":81,"sourceCode":"\t\t];\n\t}\n\n\t/**\n\t * Load configuration from environment variables\n\t */\n\tloadConfig(): PartialConfiguration {\n\t\tconst config: PartialConfiguration = {};\n\n\t\tfor (const mapping of this.mappings) {\n\t\t\t// Skip runtime state variables\n\t\t\tif (mapping.isRuntimeState) continue;\n\n\t\t\tconst value = process.env[mapping.env];\n\t\t\tif (!value) continue;\n\n\t\t\t// Validate value if validator is provided\n\t\t\tif (mapping.validate && !mapping.validate(value)) {\n\t\t\t\tthis.logger.warn(`Invalid value for ${mapping.env}: ${value}`);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Set the value in the config object\n\t\t\tthis.setNestedProperty(config, mapping.path, value);\n\t\t}\n\n\t\treturn config;\n\t}\n\n\t/**\n\t * Get runtime state from environment variables\n\t */\n\tgetRuntimeState(): Record<string, string> {\n\t\tconst state: Record<string, string> = {};\n\n\t\tfor (const mapping of this.mappings) {\n\t\t\tif (!mapping.isRuntimeState) continue;","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/packages/tm-core/src/modules/config/services/environment-config-provider.service.ts#L63-L99","documentation":"environment-config-provider.service.ts maps environment variables to config paths. When a mapped env var has a value but the mapping's optional `validate` predicate rejects it, the provider logs this warning and skips setting the property, leaving the config value at its default.","triggerScenarios":"Calling loadConfig() while an env var like a timeout or URL has a value that fails the mapping's validator (e.g. non-numeric string for a numeric field, malformed URL).","commonSituations":"Typo in a numeric env var ('tahirty' instead of '30'), port set to a non-number, empty-but-truthy strings, values copied with units ('500ms' where a plain number is expected), stale .env files after a schema change.","solutions":["Read the warning to identify the offending env var and fix its value so it passes the mapping's validate function","Check the mapping definition to see which env var names have validators and what format they expect","Remove or unset the env var if you want the built-in default to apply instead","Add or relax the validator in the config mapping if the rejected value is actually legitimate"],"exampleFix":"// before\nTIMEOUT_MS=soon\n// after\nTIMEOUT_MS=30000","handlingStrategy":"validation","validationCode":"const raw = process.env.TIMEOUT_MS;\nconst isValid = raw !== undefined && Number.isFinite(Number(raw));\nif (!isValid) console.warn('TIMEOUT_MS must be a number; got', raw);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Document each env var's expected format next to its mapping","Add a startup validation script that checks all mapped env vars","Use .env.example files with valid sample values","Watch logs for this warning in CI to catch bad env config early"],"tags":["config","environment-variables","validation"],"backgroundTag":"invalid-env-var-value","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}