{"record":{"id":"3c793f807a5c4058","repo":"jdx/mise","slug":"type-not-found","errorCode":null,"errorMessage":"Type not found","messagePattern":"Type not found","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/config/set.rs","lineNumber":222,"sourceCode":"            TomlValueTypes::Bool => toml_edit::value(value.parse::<bool>()?),\n            TomlValueTypes::List => {\n                let mut list = toml_edit::Array::new();\n                for item in value.split(',').map(|s| s.trim()) {\n                    list.push(item);\n                }\n                toml_edit::Item::Value(toml_edit::Value::Array(list))\n            }\n            TomlValueTypes::Set => {\n                let mut set = toml_edit::Array::new();\n                let value = value.trim();\n                if value != \"[]\" {\n                    for item in value.split(',').map(|s| s.trim()).filter(|s| !s.is_empty()) {\n                        set.push(item);\n                    }\n                }\n                toml_edit::Item::Value(toml_edit::Value::Array(dedup_toml_array(&set)))\n            }\n            TomlValueTypes::Infer => bail!(\"Type not found\"),\n        };\n\n        let table = container.as_table_like_mut().ok_or_else(|| {\n            eyre::eyre!(\n                \"cannot set '{full_key}': '{}' is already set to a non-table value\",\n                parts[..parts.len() - 1].join(\".\")\n            )\n        })?;\n        if self.append {\n            append_value(table, last_key, value)?;\n        } else if self.remove {\n            remove_value(table, last_key, &value)?;\n        } else {\n            table.insert(last_key, value);\n        }\n\n        let raw = config.to_string();\n        MiseToml::from_str(&raw, &file)?;","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/cli/config/set.rs#L204-L240","documentation":"`mise config set --type` accepts an explicit TOML value type (string, array, etc.). When the requested type cannot be mapped to a known TomlValueTypes variant (i.e. it falls through to the `TomlValueTypes::Infer` arm in the match), mise cannot decide how to serialize the value and bails with 'Type not found'. This is a user-input error on the --type flag, not an internal failure.","triggerScenarios":"Running `mise config set` with a --type value that does not match any supported TomlValueTypes variant (the match on the parsed type reaches the `Infer =>` arm).","commonSituations":"Typos in the --type flag (e.g. `--type str` instead of `--type string`), copy-pasting a type name from other tools (YAML/JSON schema names), or omitting --type in a context where inference is not allowed by this code path.","solutions":["Check `mise config set --help` for the exact list of accepted --type values and use one verbatim","Correct the spelling of the --type value (e.g. `str` -> `string`)","If the value is a comma-separated list, use the array type so it is split and stored as a TOML array"],"exampleFix":"// before\nmise config set env.NODE_VERSION str 20\n// after\nmise config set env.NODE_VERSION string 20","handlingStrategy":"validation","validationCode":"TYPE=$(...); case \"$TYPE\" in string|integer|float|bool|bools|array|infer) ;; *) echo \"invalid --type '$TYPE'\"; exit 1;; esac","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always check `mise config set --help` for accepted --type values","Shell-complete the --type flag instead of typing it","Add a wrapper script that validates the type before invoking mise config set"],"tags":["cli","config","toml"],"backgroundTag":"missing-required-argument","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}