{"record":{"id":"a4b5a73847befc9c","repo":"linera-io/linera-protocol","slug":"the-input-has-not-matched-input","errorCode":null,"errorMessage":"The input has not matched: {input}","messagePattern":"The input has not matched: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"linera-storage-runtime/src/storage_config.rs","lineNumber":278,"sourceCode":"                DEFAULT_NAMESPACE.to_string()\n            } else {\n                parts[5].to_string()\n            };\n            return Ok(StorageConfig {\n                inner_storage_config,\n                namespace,\n            });\n        }\n        error!(\"available storage: memory\");\n        #[cfg(feature = \"storage-service\")]\n        error!(\"Also available is linera-storage-service\");\n        #[cfg(feature = \"rocksdb\")]\n        error!(\"Also available is RocksDB\");\n        #[cfg(feature = \"scylladb\")]\n        error!(\"Also available is ScyllaDB\");\n        #[cfg(all(feature = \"rocksdb\", feature = \"scylladb\"))]\n        error!(\"Also available is DualRocksDbScyllaDb\");\n        Err(anyhow!(\"The input has not matched: {input}\"))\n    }\n}\n\nimpl StorageConfig {\n    /// Appends a shard-specific subdirectory to the storage path, if applicable.\n    #[allow(unused_variables)]\n    pub fn maybe_append_shard_path(&mut self, shard: usize) -> std::io::Result<()> {\n        match &mut self.inner_storage_config {\n            #[cfg(all(feature = \"rocksdb\", feature = \"scylladb\"))]\n            InnerStorageConfig::DualRocksDbScyllaDb {\n                path_with_guard,\n                spawn_mode: _,\n                uri: _,\n            } => {\n                let shard_str = format!(\"shard_{shard}\");\n                path_with_guard.path_buf.push(shard_str);\n                std::fs::create_dir_all(&path_with_guard.path_buf)\n            }","sourceCodeStart":260,"sourceCodeEnd":296,"githubUrl":"https://github.com/linera-io/linera-protocol/blob/6c226ddcb332ef55118dc8d0aafbd093d5420899/linera-storage-runtime/src/storage_config.rs#L260-L296","documentation":"StorageConfig::from_str dispatches on the config-string prefix: 'memory:', 'service:', 'rocksdb:', 'scylladb:' or 'dualrocksdbscylladb:'. If none matches (or the matching backend was not compiled into this binary, because its cargo feature is off), from_str logs the available backends via tracing error! and returns this error echoing the input.","triggerScenarios":"Passing --storage with an unknown prefix such as 'rocksdb2:...' or 'db:...', a bare path like '/tmp/linera', or a valid prefix whose backend feature is disabled in the build (e.g. 'rocksdb:...' on a binary compiled without the rocksdb feature).","commonSituations":"Typos in the prefix; assuming a bare directory works; using a binary from a different distribution that ships a reduced feature set; docs describing a backend the installed build lacks.","solutions":["Start the string with one of the supported prefixes: memory:, service:, rocksdb:, scylladb: or dualrocksdbscylladb:","If the prefix looks right, check the binary actually has the backend compiled in — the error! lines printed just before this error list exactly which backends this build supports","Run with tracing/RUST_LOG visible so the 'available storage' hints are shown"],"exampleFix":"# before\n--storage /tmp/linera-db\n# after\n--storage rocksdb:/tmp/linera-db","handlingStrategy":"validation","validationCode":"// Rust: check the prefix before calling from_str\nconst KNOWN_PREFIXES: &[&str] = &[\"memory:\", \"service:\", \"rocksdb:\", \"scylladb:\", \"dualrocksdbscylladb:\"];\n\nif !KNOWN_PREFIXES.iter().any(|p| input.starts_with(p)) {\n    anyhow::bail!(\"unknown storage config {input:?}; expected one of {KNOWN_PREFIXES:?}\");\n}","typeGuard":"fn has_known_storage_prefix(s: &str) -> bool {\n    s.starts_with(\"memory:\") || s.starts_with(\"service:\") || s.starts_with(\"rocksdb:\")\n        || s.starts_with(\"scylladb:\") || s.starts_with(\"dualrocksdbscylladb:\")\n}","tryCatchPattern":"let config = StorageConfig::from_str(&input)\n    .with_context(|| format!(\"could not parse storage config {input:?}; check prefix and compiled features\"))?;","preventionTips":["Run with RUST_LOG=error so the 'available storage' hints print when parsing fails","Pin the storage string in a shared config file rather than retyping prefixes","When using custom builds, record which backend features were enabled at compile time"],"tags":["linera","storage","config","parsing","cli"],"backgroundTag":"invalid-config-string","analyzedSha":"6c226ddcb332ef55118dc8d0aafbd093d5420899","analyzedAt":"2026-08-22T22:49:09.787Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}