Files
nym/nym-node/nym-node-http-api/src/error.rs
T
Tommy Verrall 1ecb57fda0 Merge pull request #4588 from nymtech/jon/explicitly-handle-sqlite-constraint-violation
Explicitly handle constraint unique violation when importing credential
2024-05-13 11:30:31 +01:00

28 lines
673 B
Rust

// Copyright 2024 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use std::io;
use std::net::SocketAddr;
use thiserror::Error;
#[derive(Debug, Error)]
pub enum NymNodeHttpError {
#[error("failed to bind the HTTP API to {bind_address}: {source}")]
HttpBindFailure {
bind_address: SocketAddr,
source: io::Error,
},
#[error("failed to use nym-node requests: {source}")]
RequestError {
#[from]
source: nym_node_requests::error::Error,
},
#[error(transparent)]
KeyRecoveryError {
#[from]
source: nym_crypto::asymmetric::encryption::KeyRecoveryError,
},
}