Skip to content

Commit

Permalink
Stop using context on error
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Jastrzebski <[email protected]>
  • Loading branch information
haaawk committed Nov 14, 2023
1 parent 513ac90 commit 1386fdd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions libsql-server/src/namespace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,14 @@ impl MakeNamespace for PrimaryNamespaceMaker {
if !ns_path.try_exists()? {
NamespaceBottomlessDbId::NotProvided
} else {
let db_config_store = DatabaseConfigStore::load(&ns_path)
.context("Could not load database config")?;
let db_config_store_result = DatabaseConfigStore::load(&ns_path);
let db_config_store = match db_config_store_result {
Ok(store) => store,
Err(err) => {
tracing::error!("could not load database: {}", err);
return Err(err);
}
};
let config = db_config_store.get();
NamespaceBottomlessDbId::from_config(&config)
}
Expand Down

0 comments on commit 1386fdd

Please sign in to comment.