sui_indexer_alt_jsonrpc/api/transactions/
error.rs

1// Copyright (c) Mysten Labs, Inc.
2// SPDX-License-Identifier: Apache-2.0
3
4use sui_types::{base_types::ObjectID, digests::TransactionDigest};
5
6#[derive(thiserror::Error, Debug)]
7pub(super) enum Error {
8    #[error("Cannot filter by function name {function:?} without specifying a module")]
9    MissingModule { function: String },
10
11    #[error("Transaction {0} not found")]
12    NotFound(TransactionDigest),
13
14    #[error("Pagination issue: {0}")]
15    Pagination(#[from] crate::paginate::Error),
16
17    #[error("Balance changes for transaction {0} are either pruned or not yet available")]
18    BalanceChangesNotFound(TransactionDigest),
19
20    #[error(
21        "Transaction {0} affected object {} pruned at version {2}",
22        .1.to_canonical_display(/* with_prefix */ true),
23    )]
24    PrunedObject(TransactionDigest, ObjectID, u64),
25}