do not expect/unwrap requests

causes tokio runtime worker to panic as we attempt to convert an HTTP
Request from ruma (try_into_http_request) into a reqwest Request so the
reqwest http client on the server can execute said request. error
message is not ideal ("invalid port number") but core issue is fixed.

Co-authored-by: infamous <ehuff007@gmail.com>
Signed-off-by: girlbossceo <june@girlboss.ceo>
This commit is contained in:
girlbossceo 2023-10-26 20:11:19 -04:00
parent 8b28225af9
commit 95187419f9

View file

@ -234,8 +234,7 @@ where
} }
} }
let reqwest_request = reqwest::Request::try_from(http_request) let reqwest_request = reqwest::Request::try_from(http_request)?;
.expect("all http requests are valid reqwest requests");
let url = reqwest_request.url().clone(); let url = reqwest_request.url().clone();