8de9f36b69
* experimenting with extracting more common client code * drying up the wasm client * allowing some dead code for the time being * fixed formatting in nym-connect * made socks5 client inside nym-connect immutable * made clippy a bit happier * hidden away target locking for recv timeout
39 lines
1.4 KiB
Rust
39 lines
1.4 KiB
Rust
// Copyright 2022 - Nym Technologies SA <contact@nymtech.net>
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
#[cfg(feature = "reply-surb")]
|
|
use crate::client::reply_key_storage::ReplyKeyStorageError;
|
|
use crypto::asymmetric::identity::Ed25519RecoveryError;
|
|
use gateway_client::error::GatewayClientError;
|
|
use validator_client::ValidatorClientError;
|
|
|
|
#[derive(thiserror::Error, Debug)]
|
|
pub enum ClientCoreError {
|
|
#[error("I/O error: {0}")]
|
|
IoError(#[from] std::io::Error),
|
|
#[error("Gateway client error: {0}")]
|
|
GatewayClientError(#[from] GatewayClientError),
|
|
#[error("Ed25519 error: {0}")]
|
|
Ed25519RecoveryError(#[from] Ed25519RecoveryError),
|
|
#[error("Validator client error: {0}")]
|
|
ValidatorClientError(#[from] ValidatorClientError),
|
|
|
|
#[cfg(feature = "reply-surb")]
|
|
#[error("Reply key storage error: {0}")]
|
|
ReplyKeyStorageError(#[from] ReplyKeyStorageError),
|
|
|
|
#[error("No gateway with id: {0}")]
|
|
NoGatewayWithId(String),
|
|
#[error("No gateways on network")]
|
|
NoGatewaysOnNetwork,
|
|
#[error("List of validator apis is empty")]
|
|
ListOfValidatorApisIsEmpty,
|
|
#[error("Could not load existing gateway configuration: {0}")]
|
|
CouldNotLoadExistingGatewayConfiguration(std::io::Error),
|
|
#[error("The current network topology seem to be insufficient to route any packets through")]
|
|
InsufficientNetworkTopology,
|
|
|
|
#[error("Unexpected exit")]
|
|
UnexpectedExit,
|
|
}
|