forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.rs
33 lines (24 loc) · 872 Bytes
/
errors.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use thiserror::Error;
#[derive(Error, Debug, PartialEq, Eq)]
pub enum FaucetError {
#[error("Faucet cannot read objects from fullnode")]
FullnodeReadingError,
#[error(
"Gas coin `{0}` does not have sufficient balance and has been removed from gas coin pool"
)]
GasCoinWithInsufficientBalance(String),
#[error("Faucet does not have enough balance")]
InsuffientBalance,
#[error("Gas coin `{0}` is not valid and has been removed from gas coin pool")]
InvalidGasCoin(String),
#[error("Timed out waiting for a coin from the gas coin pool")]
NoGasCoinAvailable,
#[error("Wallet Error: `{0}`")]
Wallet(String),
#[error("Coin Transfer Failed `{0}`")]
Transfer(String),
#[error("Internal error: {0}")]
Internal(String),
}