Skip to content

Commit 1386fdd

Browse files
committed
Stop using context on error
Signed-off-by: Piotr Jastrzebski <[email protected]>
1 parent 513ac90 commit 1386fdd

File tree

1 file changed

+8
-2
lines changed
  • libsql-server/src/namespace

1 file changed

+8
-2
lines changed

libsql-server/src/namespace/mod.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,14 @@ impl MakeNamespace for PrimaryNamespaceMaker {
208208
if !ns_path.try_exists()? {
209209
NamespaceBottomlessDbId::NotProvided
210210
} else {
211-
let db_config_store = DatabaseConfigStore::load(&ns_path)
212-
.context("Could not load database config")?;
211+
let db_config_store_result = DatabaseConfigStore::load(&ns_path);
212+
let db_config_store = match db_config_store_result {
213+
Ok(store) => store,
214+
Err(err) => {
215+
tracing::error!("could not load database: {}", err);
216+
return Err(err);
217+
}
218+
};
213219
let config = db_config_store.get();
214220
NamespaceBottomlessDbId::from_config(&config)
215221
}

0 commit comments

Comments
 (0)