debug log well-known response body and text
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
14a0d12002
commit
ae11e378d2
1 changed files with 2 additions and 0 deletions
|
@ -550,12 +550,14 @@ async fn request_well_known(destination: &str) -> Option<String> {
|
||||||
.send()
|
.send()
|
||||||
.await;
|
.await;
|
||||||
debug!("Got well known response");
|
debug!("Got well known response");
|
||||||
|
debug!("Well known response: {:?}", response);
|
||||||
if let Err(e) = &response {
|
if let Err(e) = &response {
|
||||||
debug!("Well known error: {e:?}");
|
debug!("Well known error: {e:?}");
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
let text = response.ok()?.text().await;
|
let text = response.ok()?.text().await;
|
||||||
debug!("Got well known response text");
|
debug!("Got well known response text");
|
||||||
|
debug!("Well known response text: {:?}", text);
|
||||||
let body: serde_json::Value = serde_json::from_str(&text.ok()?).ok()?;
|
let body: serde_json::Value = serde_json::from_str(&text.ok()?).ok()?;
|
||||||
Some(body.get("m.server")?.as_str()?.to_owned())
|
Some(body.get("m.server")?.as_str()?.to_owned())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue