Skip to content

Commit 3610a4f

Browse files
[indexer] Propagate errors (#17434)
1 parent 503ac50 commit 3610a4f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ecosystem/indexer-grpc/indexer-grpc-table-info/src/table_info_service.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use crate::{
55
backup_restore::gcs::GcsBackupRestoreOperator, snapshot_folder_name, snapshot_folder_prefix,
66
};
7-
use anyhow::{Context, Error};
7+
use anyhow::{anyhow, Context, Error};
88
use aptos_api::context::Context as ApiContext;
99
use aptos_api_types::TransactionOnChainData;
1010
use aptos_db_indexer::db_v2::IndexerAsyncV2;
@@ -377,9 +377,7 @@ impl TableInfoService {
377377
let write_sets_slice: Vec<&WriteSet> = write_sets.iter().collect();
378378
indexer_async_v2
379379
.index_table_info(context.db.clone(), first_version, &write_sets_slice)
380-
.expect(
381-
"[Table Info] Failed to process write sets and index to the table info rocksdb",
382-
);
380+
.map_err(|err| anyhow!("[Table Info] Failed to process write sets and index to the table info rocksdb: {}", err))?;
383381

384382
info!(
385383
table_info_first_version = first_version,

0 commit comments

Comments
 (0)