fix: expose parsing error coming from invalid object store uri (#2475)

this PR is to expose the error from `ListingCatalog::open_path` which
unwrap the Result coming from `ObjectStore::from_uri` to avoid panic
This commit is contained in:
Kilerd Chan
2025-06-30 10:33:18 +08:00
committed by GitHub
parent 7760799cb8
commit ba755626cc

View File

@@ -105,7 +105,7 @@ impl ListingCatalog {
}
async fn open_path(path: &str) -> Result<Self> {
let (object_store, base_path) = ObjectStore::from_uri(path).await.unwrap();
let (object_store, base_path) = ObjectStore::from_uri(path).await?;
if object_store.is_local() {
Self::try_create_dir(path).context(CreateDirSnafu { path })?;
}