Skip to content

Commit 0b16f8a

Browse files
authored
core: Add more context to errors returned from host controller (#3449)
Namely, add replica id and database identity to the error context. # Expected complexity level and risk 1 # Testing
1 parent 76f3368 commit 0b16f8a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/core/src/host/host_controller.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,10 @@ impl HostController {
521521
}
522522

523523
async fn try_init_host(&self, database: Database, replica_id: u64) -> anyhow::Result<Host> {
524-
Host::try_init(self, database, replica_id).await
524+
let database_identity = database.database_identity;
525+
Host::try_init(self, database, replica_id)
526+
.await
527+
.with_context(|| format!("failed to init replica {} for {}", replica_id, database_identity))
525528
}
526529
}
527530

0 commit comments

Comments
 (0)