Skip to content

Commit

Permalink
When the before/until signatures can't be found, throw `Signature…
Browse files Browse the repository at this point in the history
…NotFound` instead of `RowNotFound`
  • Loading branch information
steveluscher committed Nov 19, 2024
1 parent 3dd5947 commit f2ca0d0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions storage-bigtable/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,11 @@ impl LedgerStorage {
Some(before_signature) => {
let TransactionInfo { slot, index, .. } = bigtable
.get_bincode_cell("tx", before_signature.to_string())
.await?;
.await
.map_err(|err| match err {
bigtable::Error::RowNotFound => Error::SignatureNotFound,
_ => err.into(),
})?;

(slot, index)
}
Expand All @@ -808,7 +812,11 @@ impl LedgerStorage {
Some(until_signature) => {
let TransactionInfo { slot, index, .. } = bigtable
.get_bincode_cell("tx", until_signature.to_string())
.await?;
.await
.map_err(|err| match err {
bigtable::Error::RowNotFound => Error::SignatureNotFound,
_ => err.into(),
})?;

(slot, index)
}
Expand Down

0 comments on commit f2ca0d0

Please sign in to comment.