84c1679973
* Add nym- prefix to nymcoconut * Add nym- prefix to validator-client * Add nym- prefix to gateway-requests * Add nym- prefix to mobile-storage * Add nym- prefix to gateway-client * Add nym- prefix to client-core * rustfmt
45 lines
1.4 KiB
Rust
45 lines
1.4 KiB
Rust
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
use nym_coconut_interface::CoconutError;
|
|
use nym_crypto::asymmetric::encryption::KeyRecoveryError;
|
|
use nym_validator_client::ValidatorClientError;
|
|
|
|
use thiserror::Error;
|
|
|
|
#[derive(Debug, Error)]
|
|
pub enum Error {
|
|
#[error("IO error")]
|
|
IOError(#[from] std::io::Error),
|
|
|
|
#[error("The detailed description is yet to be determined")]
|
|
BandwidthCredentialError,
|
|
|
|
#[error("Could not contact any validator")]
|
|
NoValidatorsAvailable,
|
|
|
|
#[error("Ran into a coconut error - {0}")]
|
|
CoconutError(#[from] CoconutError),
|
|
|
|
#[error("Ran into a validator client error - {0}")]
|
|
ValidatorClientError(#[from] ValidatorClientError),
|
|
|
|
#[error("Bandwidth operation overflowed. {0}")]
|
|
BandwidthOverflow(String),
|
|
|
|
#[error("There is not associated bandwidth for the given client")]
|
|
MissingBandwidth,
|
|
|
|
#[error("Could not parse the key - {0}")]
|
|
ParsePublicKey(#[from] KeyRecoveryError),
|
|
|
|
#[error("Could not gather enough signature shares. Try again using the recovery command")]
|
|
NotEnoughShares,
|
|
|
|
#[error("Could not aggregate signature shares - {0}. Try again using the recovery command")]
|
|
SignatureAggregationError(CoconutError),
|
|
|
|
#[error("Could not deserialize bandwidth voucher - {0}")]
|
|
BandwidthVoucherDeserializationError(String),
|
|
}
|