{"record":{"id":"867efd45e9bd0681","repo":"jdx/mise","slug":"user-service-name-names-unknown-builtin-buil","errorCode":null,"errorMessage":"user service '{name}' names unknown builtin '{builtin_name}'; available: {}","messagePattern":"user service '(.+?)' names unknown builtin '(.+?)'; available: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/user_services.rs","lineNumber":104,"sourceCode":"            bail!(\"user service '{name}' cannot be masked; use `state = \\\"absent\\\"` to remove it\");\n        }\n        if config.on_change != super::services_common::ServiceChangeAction::default() {\n            bail!(\"user service '{name}': `on_change` only applies to system services\");\n        }\n        let mut description = config.description;\n        let mut restart = config.restart;\n        let mut nice = None;\n        let mut unresolved = None;\n        let command = match (config.builtin.as_deref(), config.command.as_deref()) {\n            (Some(_), Some(_)) => {\n                bail!(\"user service '{name}' sets both `builtin` and `command`; choose one\")\n            }\n            (None, None) => {\n                bail!(\"user service '{name}' must set `command` or `builtin`\")\n            }\n            (Some(builtin_name), None) => {\n                let Some(definition) = builtin(builtin_name) else {\n                    bail!(\n                        \"user service '{name}' names unknown builtin '{builtin_name}'; available: {}\",\n                        BUILTIN_NAMES.join(\", \")\n                    );\n                };\n                description.get_or_insert_with(|| definition.description.to_string());\n                restart.get_or_insert(definition.restart);\n                nice = definition.nice;\n                match executable {\n                    Some(exe) => Some(\n                        std::iter::once(quote_program(&exe.to_string_lossy()))\n                            .chain(definition.args.iter().map(|arg| arg.to_string()))\n                            .collect::<Vec<_>>()\n                            .join(\" \"),\n                    ),\n                    None => {\n                        unresolved = Some(\n                            \"no durable mise executable; install mise on this host first\"\n                                .to_string(),","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/user_services.rs#L86-L122","documentation":"When `builtin = \"<name>\"` is given, the name must match one of the known built-in service definitions (listed in BUILTIN_NAMES). An unknown builtin name fails parsing, with the error listing all valid built-ins.","triggerScenarios":"`builtin` set to a string not present in `BUILTIN_NAMES`, so `builtin(builtin_name)` returns None at src/system/user_services.rs:104.","commonSituations":"Typo in a builtin name; guessing builtin names without checking the available list; built-in renamed between versions.","solutions":["Replace `builtin` with one of the names listed in the error message (BUILTIN_NAMES.join(\", \"))","Check spelling/casing of the builtin name","If no builtin fits, use a custom `command` instead"],"exampleFix":"// before\n[[bootstrap.linux.user_services]]\nname = \"sync\"\nbuiltin = \"syncthind\"\n\n// after\n[[bootstrap.linux.user_services]]\nname = \"sync\"\nbuiltin = \"syncthing\"","handlingStrategy":"validation","validationCode":"const BUILTIN_NAMES: &[&str] = &[\n    // list from the error message's available builtins\n];\nfn validate_builtin(s: &UserServiceConfig) -> Result<(), String> {\n    if let Some(b) = &s.builtin {\n        if !BUILTIN_NAMES.contains(&b.as_str()) {\n            return Err(format!(\"unknown builtin '{}' for service '{}'\", b, s.name));\n        }\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy builtin names from the error's available list or docs","Watch for builtin renames across mise versions"],"tags":["config","validation","unknown-value","user-services"],"backgroundTag":"invalid-enum-value","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"}