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