Skip to content

Commit

Permalink
Better URL parse error message
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Oct 10, 2024
1 parent 4eb7f00 commit bf27223
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ewebsock/src/native_tungstenite_tokio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ async fn ws_connect_async(
let uri: tungstenite::http::Uri = match url.parse() {
Ok(uri) => uri,
Err(err) => {
on_event(WsEvent::Error(err.to_string()));
on_event(WsEvent::Error(format!(
"Failed to parse URL {url:?}: {err}"
)));
return;
}
};
Expand Down

0 comments on commit bf27223

Please sign in to comment.