{"record":{"id":"6134b24cd73ceebd","repo":"quickwit-oss/quickwit","slug":"unknown-uri-protocol-protocol","errorCode":null,"errorMessage":"unknown URI protocol `{protocol}`","messagePattern":"unknown URI protocol `(.+?)`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-common/src/uri.rs","lineNumber":92,"sourceCode":"    fn fmt(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {\n        write!(formatter, \"{}\", self.as_str())\n    }\n}\n\nimpl FromStr for Protocol {\n    type Err = anyhow::Error;\n\n    fn from_str(protocol: &str) -> anyhow::Result<Self> {\n        match protocol {\n            \"azure\" => Ok(Protocol::Azure),\n            \"file\" => Ok(Protocol::File),\n            \"grpc\" => Ok(Protocol::Grpc),\n            \"actor\" => Ok(Protocol::Actor),\n            \"pg\" | \"postgres\" | \"postgresql\" => Ok(Protocol::PostgreSQL),\n            \"ram\" => Ok(Protocol::Ram),\n            \"s3\" => Ok(Protocol::S3),\n            \"gs\" => Ok(Protocol::Google),\n            _ => bail!(\"unknown URI protocol `{protocol}`\"),\n        }\n    }\n}\n\nconst PROTOCOL_SEPARATOR: &str = \"://\";\n\n/// Encapsulates the URI type.\n///\n/// URI's string representation are guaranteed to start\n/// by the protocol `str()` representation.\n///\n/// # Disclaimer\n///\n/// Uri has to be built using `Uri::from_str`.\n/// This function has some normalization behavior.\n/// Some protocol have several acceptable string representation (`pg`, `postgres`, `postgresql`).\n///\n/// If the representation in the input string is not canonical, it will get normalized.","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-common/src/uri.rs#L74-L110","documentation":"`Protocol::from_str` in quickwit-common's uri module maps URI scheme strings to the `Protocol` enum, accepting a fixed set: http/https/grpc/actor/pg (postgres, postgresql)/ram/s3/gs. Any other scheme is rejected with this error. Quickwit URIs are scheme-dispatched (where to read/write data), so an unrecognized scheme cannot be resolved to a storage backend.","triggerScenarios":"Parsing a URI whose scheme is not in the supported set — e.g. `\"file:///data\"`, `\"azure://...\"`, `\"s3a://bucket/x\"`, `\"PSQL://...\"` (uppercase without normalization upstream) — via `Protocol::from_str` or `Uri::from_str` on index/storage URIs in configs and metastore records.","commonSituations":"Configuring an index_uri with an unsupported backend (azure without the feature/scheme, `file://` instead of a bare path), typos like `s3x://` or `gsx://`, copy-pasted URIs from other systems, or legacy configs using schemes renamed in newer Quickwit versions.","solutions":["Use a supported scheme: `s3://`, `gs://`, `ram://`, `grpc://`, `actor://`, or `pg://`/`postgres://`/`postgresql://`.","For local filesystem storage, use a plain absolute path (e.g. `/data/quickwit`) rather than `file://`.","Check the scheme's spelling and casing, and that the matching cloud-storage feature is compiled in if the scheme is valid but unsupported in this build.","If migrating from an older config, update URIs to the current protocol names."],"exampleFix":"// before\nlet uri: Uri = \"file:///data/quickwit\".parse()?; // unknown protocol\n// after\nlet uri: Uri = \"/data/quickwit\".parse()?; // bare path for local storage","handlingStrategy":"validation","validationCode":"const SUPPORTED_SCHEMES: [&str; 9] = [\"http\", \"https\", \"grpc\", \"actor\", \"pg\", \"postgres\", \"postgresql\", \"ram\", \"s3\"];\nfn check_uri_scheme(uri: &str) -> Result<(), String> {\n    if let Some((scheme, _)) = uri.split_once(\"://\") {\n        if !SUPPORTED_SCHEMES.contains(&scheme.to_ascii_lowercase().as_str()) {\n            return Err(format!(\n                \"unsupported scheme '{scheme}'; use s3://, gs://, ram://, pg://, grpc://, actor://, or a plain local path\"\n            ));\n        }\n    } // no scheme => local path, OK\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":"match uri_str.parse::<quickwit_common::uri::Uri>() {\n    Ok(uri) => use_uri(uri),\n    Err(e) if e.to_string().contains(\"unknown URI protocol\") => {\n        // surface supported schemes to the user, fix config\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Validate index_uri/storage URIs against the supported scheme list before writing config.","Use bare absolute paths for local filesystem storage, not file://.","Remember gs:// (not gcs://) for Google Cloud Storage and s3:// (not s3a://) for S3.","Lowercase scheme strings and test URI parsing in CI for config templates."],"tags":["uri","parsing","storage","configuration"],"backgroundTag":"invalid-url","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}