databendlabs/databend · error
Unsupported scheme
Error message
Unsupported scheme: {} What it means
load_bendsave_storage only supports the s3 and fs URI schemes; any other scheme falls into the catch-all arm and returns this error. The operator cannot be constructed because opendal has no configured service for the unknown scheme.
Solutions
- Use s3:// (with bucket and query params) or fs:// (local path) URIs only.
- Fix the scheme typo if you meant s3 or fs.
- For object stores that are S3-compatible (GCS interop, MinIO), expose them via the s3 scheme with the proper endpoint parameter.
- If another backend is genuinely required, extend the match in load_bendsave_storage with a new Operator::from_iter service branch.
Example fix
// before let uri = "gcs://my-bucket/backups"; // after let uri = "s3://my-bucket/backups?endpoint=https://storage.googleapis.com";
Defensive patterns
Strategy: validation
Validate before calling
// Rust: restrict schemes before calling the loader
const ALLOWED: [&str; 2] = ["s3", "fs"];
let scheme = url::Url::parse(&uri)?.scheme().to_string();
if !ALLOWED.contains(&scheme.as_str()) {
return Err(format!("scheme '{scheme}' not supported; use s3 or fs"));
} Try / catch
match load_bendsave_storage(&uri, ...) {
Ok(op) => op,
Err(e) if e.to_string().starts_with("Unsupported scheme") => {
eprintln!("use s3:// or fs:// URI"); Err(e)
}
Err(e) => Err(e),
} Prevention
- Document the supported schemes (s3, fs) in your tooling help text
- Normalize S3-compatible stores (MinIO, GCS interop) to the s3 scheme
- Add a unit test that parses all operator-supplied URIs
When it happens
Trigger: Passing backup/restore a storage URI with a scheme other than s3:// or fs:// (e.g. azblob://, gcs://, oss://, or a typo like s4://).
Common situations: Using URI schemes familiar from other tools (cloud-storage-rs, rclone) that this bendsave build does not implement; typo in the scheme; expecting GCS/Azure support that isn't wired in.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- bendsave requires bucket but it's empty in uri
- URI protocol is not supported yet.
- Unsupported format for
- Unsupported source type. Expected path, pandas.DataFrame…
- Access denied: is outside allowed directories
AI-assisted analysis of databendlabs/databend@288d84d76e (2026-09-11).
Data as JSON: /api/errors/2c9fa87b4076dab9.
Report an issue: GitHub.
Appendix: source
Thrown at src/bendsave/src/storage.rs:212
let op = match scheme {
"s3" => {
if name.is_empty() {
return Err(anyhow!(
"bendsave requires bucket but it's empty in uri: {}",
uri.to_string()
));
}
map.insert("bucket".to_string(), name.to_string());
map.insert("root".to_string(), path.to_string());
let op = Operator::from_iter::<opendal::services::S3>(map)?.finish();
Ok(op)
}
"fs" => {
map.insert("root".to_string(), format!("/{name}/{path}"));
let op = Operator::from_iter::<opendal::services::Fs>(map)?.finish();
Ok(op)
}
_ => Err(anyhow::anyhow!("Unsupported scheme: {}", scheme)),
}?;
let op = op
.layer(RetryLayer::default().with_jitter())
.layer(LoggingLayer::default());
debug!("epoch storage loaded: {:?}", op.info());
Ok(op)
}
#[cfg(test)]
mod tests {
use std::path::Path;
use opendal::Scheme;
use super::*;
#[tokio::test]View on GitHub (pinned to 288d84d76e)