dgraph_tonic/errors/
dgraph.rs

1use anyhow::Error as Failure;
2use thiserror::Error as Fail;
3
4///
5/// Possible Dgraph errors
6///
7#[derive(Debug, Fail)]
8pub enum Error {
9    #[error("Dgraph: Txn start mismatch")]
10    StartTsMismatch,
11    #[error("Dgraph: gRPC communication Error.")]
12    GrpcError(#[from] Failure),
13    #[error("Dgraph: Txn is empty")]
14    EmptyTxn,
15    #[error("Dgraph: Missing Txn context")]
16    MissingTxnContext,
17    #[error("Dgraph: Txn is already committed")]
18    TxnCommitted,
19}