mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-13 06:20:02 -04:00
make it fully typed and errors more verbose
This commit is contained in:
parent
e35717bf2c
commit
373d2f4a4d
5 changed files with 79 additions and 47 deletions
|
@ -198,8 +198,11 @@ impl WebSocketRead for WispTransportRead {
|
|||
if let Some(pkt) = obj {
|
||||
let pkt =
|
||||
pkt.map_err(|x| WispError::WsImplError(Box::new(EpoxyError::wisp_transport(x))))?;
|
||||
let arr: ArrayBuffer = pkt.dyn_into().map_err(|_| {
|
||||
WispError::WsImplError(Box::new(EpoxyError::InvalidWispTransportPacket))
|
||||
let arr: ArrayBuffer = pkt.dyn_into().map_err(|x| {
|
||||
WispError::WsImplError(Box::new(EpoxyError::InvalidWispTransportPacket(format!(
|
||||
"{:?}",
|
||||
x
|
||||
))))
|
||||
})?;
|
||||
|
||||
Ok(Frame::binary(Payload::Bytes(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue