Skip to content

Commit 5b9db18

Browse files
committed
fix: propagate CFG delete errors instead of silently swallowing (#719)
1 parent 9e3c3da commit 5b9db18

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

crates/codegraph-core/src/native_db.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -871,8 +871,10 @@ impl NativeDatabase {
871871
// Delete existing CFG data for this node so the caller doesn't
872872
// need to perform deletes on a separate (JS) connection, which
873873
// would cause a WAL conflict with the native connection.
874-
let _ = del_edges.execute(params![entry.node_id]);
875-
let _ = del_blocks.execute(params![entry.node_id]);
874+
del_edges.execute(params![entry.node_id])
875+
.map_err(|e| napi::Error::from_reason(format!("cfg_edges delete failed: {e}")))?;
876+
del_blocks.execute(params![entry.node_id])
877+
.map_err(|e| napi::Error::from_reason(format!("cfg_blocks delete failed: {e}")))?;
876878

877879
let mut block_db_ids: std::collections::HashMap<u32, i64> =
878880
std::collections::HashMap::new();

0 commit comments

Comments
 (0)