use ic_kit::RejectionCode;
use thiserror::Error;
mod insert;
pub use insert::*;
mod query;
pub use query::get_transaction;
#[derive(Error, Debug)]
pub enum GetTransactionError {
#[error("the query was rejected")]
Unexpected(RejectionCode, String),
#[error("no transaction found with the given id")]
InvalidId,
}
#[derive(Error, Debug)]
pub enum InsertTransactionError {
#[error("the query was rejected")]
Unexpected(RejectionCode, String),
#[error("the root canister does not accept writes from this canister")]
CantWrite,
#[error("no transaction found with the given id")]
InvalidId,
}