mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-12 22:10:01 -04:00
expose underlying io error in wisp close reason error, refactor tls config creation
This commit is contained in:
parent
f3a78a1715
commit
286dcba20a
4 changed files with 21 additions and 27 deletions
|
@ -99,8 +99,8 @@ pub enum EpoxyError {
|
|||
InvalidDnsName(#[from] futures_rustls::rustls::pki_types::InvalidDnsNameError),
|
||||
#[error("Wisp: {0:?} ({0})")]
|
||||
Wisp(#[from] wisp_mux::WispError),
|
||||
#[error("Wisp server closed: {0}")]
|
||||
WispCloseReason(wisp_mux::CloseReason),
|
||||
#[error("Wisp server closed: {0} (IO error: {1:?} ({1}))")]
|
||||
WispCloseReason(CloseReason, std::io::Error),
|
||||
#[error("IO: {0:?} ({0})")]
|
||||
Io(#[from] std::io::Error),
|
||||
#[error("HTTP: {0:?} ({0})")]
|
||||
|
@ -111,6 +111,8 @@ pub enum EpoxyError {
|
|||
Hyper(#[from] hyper::Error),
|
||||
#[error("HTTP ToStr: {0:?} ({0})")]
|
||||
ToStr(#[from] http::header::ToStrError),
|
||||
#[error("Rustls: {0:?} ({0})")]
|
||||
Rustls(#[from] futures_rustls::rustls::Error),
|
||||
#[cfg(feature = "full")]
|
||||
#[error("Pemfile: {0:?} ({0})")]
|
||||
Pemfile(std::io::Error),
|
||||
|
@ -218,12 +220,6 @@ impl From<InvalidMethod> for EpoxyError {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<CloseReason> for EpoxyError {
|
||||
fn from(value: CloseReason) -> Self {
|
||||
EpoxyError::WispCloseReason(value)
|
||||
}
|
||||
}
|
||||
|
||||
enum EpoxyResponse {
|
||||
Success(Response<Incoming>),
|
||||
Redirect((Response<Incoming>, http::Request<StreamingBody>)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue