9a68702d4d
* revamping mixnode connfig * wip * native client config revamping * wip * building socks5 * using const for mixnnode config template * compiling updated gateway * nym-api * nym-sdk * everything compiling once more but definitely not compatible with CI and older versions (yet) * creating full directory structure on init * renamed paths to storage_paths and fixed mixnode template * mixnode config migration * gateway config migration * nym-api config migration * native client config migration * socks5 client config migration * NR config migration * removed deprecations (that will be resolved in the following PRs) + fixed clippy * nym-connect clippy * nym-connect config updates * outfox fixes * defined socks5 lib config * clippy * fixed wasm client build * removed explicit packet_type argument when starting base client it's known implicitly from the previously passed config struct * Empty commit * fixed re-using gateway information when client configs are re-initialised * fixed borrowing id value in nym-connect * post-rebase fixes * updated 'old_config' versions --------- Co-authored-by: Tommy Verrall <tommy@nymtech.net>
51 lines
1.4 KiB
Rust
51 lines
1.4 KiB
Rust
// Copyright 2023 - Nym Technologies SA <contact@nymtech.net>
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
use nym_validator_client::nyxd::AccountId;
|
|
use nym_validator_client::ValidatorClientError;
|
|
use std::io;
|
|
use std::path::PathBuf;
|
|
use thiserror::Error;
|
|
|
|
#[derive(Debug, Error)]
|
|
pub(crate) enum GatewayError {
|
|
#[error(
|
|
"failed to load config file for id {id} using path {path}. detailed message: {source}"
|
|
)]
|
|
ConfigLoadFailure {
|
|
id: String,
|
|
path: PathBuf,
|
|
#[source]
|
|
source: io::Error,
|
|
},
|
|
|
|
#[error(
|
|
"failed to save config file for id {id} using path {path}. detailed message: {source}"
|
|
)]
|
|
ConfigSaveFailure {
|
|
id: String,
|
|
path: PathBuf,
|
|
#[source]
|
|
source: io::Error,
|
|
},
|
|
|
|
#[error("the configured version of the gateway ({config_version}) is incompatible with the binary version ({binary_version})")]
|
|
LocalVersionCheckFailure {
|
|
binary_version: String,
|
|
config_version: String,
|
|
},
|
|
|
|
#[error("could not obtain the information about current gateways on the network: {source}")]
|
|
NetworkGatewaysQueryFailure {
|
|
#[source]
|
|
source: ValidatorClientError,
|
|
},
|
|
|
|
#[error("address {account} has an invalid bech32 prefix. it uses '{actual_prefix}' while '{expected_prefix}' was expected")]
|
|
InvalidBech32AccountPrefix {
|
|
account: AccountId,
|
|
expected_prefix: String,
|
|
actual_prefix: String,
|
|
},
|
|
}
|