{"record":{"id":"d925f78e6d60e6f5","repo":"linera-io/linera-protocol","slug":"for-storage-service-the-formatting-has-to-be-serv","errorCode":null,"errorMessage":"For Storage service, the formatting has to be service:endpoint:namespace,example service:tcp:127.0.0.1:7878:table_do_my_test","messagePattern":"For Storage service, the formatting has to be service:endpoint:namespace,example service:tcp:127\\.0\\.0\\.1:7878:table_do_my_test","errorType":"validation","errorClass":"anyhow","httpStatus":null,"severity":"error","filePath":"linera-storage-runtime/src/storage_config.rs","lineNumber":109,"sourceCode":"                    inner_storage_config,\n                    namespace,\n                });\n            }\n            if parts.len() != 2 {\n                bail!(\"We should have one genesis config path and one optional namespace\");\n            }\n            let genesis_path = parts[0].to_string().into();\n            let namespace = parts[1].to_string();\n            let inner_storage_config = InnerStorageConfig::Memory { genesis_path };\n            return Ok(StorageConfig {\n                inner_storage_config,\n                namespace,\n            });\n        }\n        #[cfg(feature = \"storage-service\")]\n        if let Some(s) = input.strip_prefix(STORAGE_SERVICE) {\n            if s.is_empty() {\n                bail!(\n                    \"For Storage service, the formatting has to be service:endpoint:namespace,\\\nexample service:tcp:127.0.0.1:7878:table_do_my_test\"\n                );\n            }\n            let parts = s.split(':').collect::<Vec<_>>();\n            if parts.len() != 4 {\n                bail!(\"We should have one endpoint and one namespace\");\n            }\n            let protocol = parts[0];\n            if protocol != \"tcp\" {\n                bail!(\"Only allowed protocol is tcp\");\n            }\n            let endpoint = parts[1];\n            let port = parts[2];\n            let mut endpoint = endpoint.to_string();\n            endpoint.push(':');\n            endpoint.push_str(port);\n            let endpoint = endpoint.to_string();","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/linera-io/linera-protocol/blob/6c226ddcb332ef55118dc8d0aafbd093d5420899/linera-storage-runtime/src/storage_config.rs#L91-L127","documentation":"Raised while parsing a `service:` storage configuration string in `StorageConfig::from_str` (linera-storage-runtime, storage-service feature). The string after the `service:` prefix is empty, so there is no endpoint/namespace to parse. The expected format is `service:tcp:<endpoint>:<port>:<namespace>`, e.g. `service:tcp:127.0.0.1:7878:table_do_my_test`.","triggerScenarios":"Passing exactly `service:` (or `service` followed only by whitespace) as the storage configuration; building the storage string programmatically and concatenating an empty endpoint.","commonSituations":"Empty environment variables feeding a storage string template; misconfigured test scripts that default the endpoint to an unset variable.","solutions":["Provide the full endpoint: `service:tcp:127.0.0.1:7878:table_my_test`","Check that the variable holding the endpoint/namespace is actually set before building the string"],"exampleFix":"# before\n--storage service:\n\n# after\n--storage service:tcp:127.0.0.1:7878:table_do_my_test","handlingStrategy":"validation","validationCode":"// Rust: reject an empty service endpoint before FromStr\nlet rest = storage_str.strip_prefix(\"service:\").unwrap_or(\"\");\nanyhow::ensure!(!rest.is_empty(), \"service storage needs an endpoint: service:tcp:host:port:namespace\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check that env vars feeding the storage string are non-empty before formatting","Keep the canonical example (service:tcp:127.0.0.1:7878:table_do_my_test) next to config knobs"],"tags":["config","parsing","storage-service","linera-storage"],"backgroundTag":"connection-string-parse-error","analyzedSha":"6c226ddcb332ef55118dc8d0aafbd093d5420899","analyzedAt":"2026-08-22T22:49:09.787Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}