reconsider error and introduce custom error using thiserror

This commit is contained in:
Jun Kurihara 2022-07-27 20:09:36 +09:00
commit 6d41830eba
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
8 changed files with 61 additions and 27 deletions

View file

@ -56,7 +56,7 @@ where
}
Err(err) => {
warn!("QUIC accepting connection failed: {:?}", err);
return Err(anyhow!("{}", err));
return Err(RpxyError::QuicConn(err));
}
}
@ -104,7 +104,7 @@ where
debug!("HTTP/3 incoming request trailers");
sender.send_trailers(trailers.unwrap()).await?;
}
Ok(()) as Result<()>
Ok(())
});
let new_req: Request<Body> = Request::from_parts(req_parts, req_body);