{"record":{"id":"c4c8e9132fcd78bd","repo":"jdx/mise","slug":"unknown-history-sync-mode-other-use-sync-fet","errorCode":null,"errorMessage":"unknown history.sync mode {other:?}; use sync, fetch-only, or manual","messagePattern":"unknown history\\.sync mode (.+?); use sync, fetch-only, or manual","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/sync/mod.rs","lineNumber":57,"sourceCode":"    /// No automatic network activity: `sync` and `pull` on request only.\n    Manual,\n}\n\n/// What a mode does in the background.\n#[derive(Clone, Copy, Debug, PartialEq, Eq)]\npub(crate) struct Automatic {\n    pub publish: bool,\n    pub fetch: bool,\n    pub apply: bool,\n}\n\nimpl SyncMode {\n    pub(crate) fn parse(value: &str) -> Result<Self> {\n        match value {\n            \"sync\" => Ok(Self::Sync),\n            \"fetch-only\" => Ok(Self::FetchOnly),\n            \"manual\" => Ok(Self::Manual),\n            other => bail!(\"unknown history.sync mode {other:?}; use sync, fetch-only, or manual\"),\n        }\n    }\n\n    pub(crate) fn current() -> Result<Self> {\n        Self::parse(&crate::config::Settings::get().history.sync)\n    }\n\n    pub(crate) fn as_str(self) -> &'static str {\n        match self {\n            Self::Sync => \"sync\",\n            Self::FetchOnly => \"fetch-only\",\n            Self::Manual => \"manual\",\n        }\n    }\n\n    pub(crate) fn publishes(self) -> bool {\n        self != Self::FetchOnly\n    }","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/history/sync/mod.rs#L39-L75","documentation":"SyncMode::parse maps the configured history.sync string to one of three modes: sync, fetch-only, or manual. Any other value is rejected with this error so an unrecognized mode never silently disables syncing. The error names the offending value and lists the valid options.","triggerScenarios":"Calling SyncMode::parse (or SyncMode::current, which parses the value from Settings::history.sync) with a string other than \"sync\", \"fetch-only\", or \"manual\" — e.g. a typo like \"fetch_only\" or \"off\".","commonSituations":"Typos or wrong separators in mise.toml settings (underscore vs hyphen); copying a mode name from an older or newer version of the tool where the enum differed; editing settings by hand without the JSON schema.","solutions":["Set history.sync in your configuration to exactly one of: sync, fetch-only, or manual","Check for typos and use hyphens not underscores (fetch-only, not fetch_only)","Check the schema/docs for the current release in case the mode name changed between versions"],"exampleFix":"# before (mise.toml)\n[history]\nsync = \"fetch_only\"\n# after\n[history]\nsync = \"fetch-only\"","handlingStrategy":"validation","validationCode":"const SYNC_MODES = [\"sync\", \"fetch-only\", \"manual\"];\nif (!SYNC_MODES.includes(settings.history.sync)) {\n  throw new Error(`history.sync must be one of ${SYNC_MODES.join(\", \")}`);\n}","typeGuard":"function isSyncMode(v: string): v is \"sync\" | \"fetch-only\" | \"manual\" {\n  return [\"sync\", \"fetch-only\", \"manual\"].includes(v);\n}","tryCatchPattern":"match SyncMode::parse(&value) {\n    Ok(mode) => mode,\n    Err(e) => {\n        eprintln!(\"{e}; falling back to SyncMode::Manual\");\n        SyncMode::Manual\n    }\n}","preventionTips":["Use the JSON schema / editor validation for your config file so invalid enum values are flagged","Only copy mode names from the current version's docs, not older blog posts","Prefer `mise config` or schema-validated edits over hand-editing settings"],"tags":["config","enum","validation"],"backgroundTag":"invalid-enum-value","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}