Skip to content

Commit 3acabfe

Browse files
committed
store: Improve revert error message to mention stale block possibility
1 parent bfe331a commit 3acabfe

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

store/postgres/src/deployment.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,10 @@ pub async fn revert_block_ptr(
626626
match affected_rows {
627627
1 => Ok(()),
628628
0 => Err(StoreError::Unknown(anyhow!(
629-
"No rows affected. This could be due to an attempt to revert beyond earliest_block + reorg_threshold",
629+
"No rows affected. The revert target (block {}) may be beyond earliest_block + \
630+
reorg_threshold, or the revert target may be a stale block from a previous reorg \
631+
that no longer exists on the canonical chain",
632+
ptr.number,
630633
))),
631634
_ => Err(StoreError::Unknown(anyhow!(
632635
"Expected to update 1 row, but {} rows were affected",

0 commit comments

Comments
 (0)