use a proper function for this instead of checking 200
Signed-off-by: girlbossceo <june@girlboss.ceo>
This commit is contained in:
parent
9bb1dca5f1
commit
64084fb2d0
3 changed files with 4 additions and 4 deletions
|
@ -79,7 +79,7 @@ where
|
||||||
Vec::new().into()
|
Vec::new().into()
|
||||||
}); // TODO: handle timeout
|
}); // TODO: handle timeout
|
||||||
|
|
||||||
if status != 200 {
|
if !status.is_success() {
|
||||||
warn!(
|
warn!(
|
||||||
"Appservice returned bad response {} {}\n{}\n{:?}",
|
"Appservice returned bad response {} {}\n{}\n{:?}",
|
||||||
destination,
|
destination,
|
||||||
|
|
|
@ -267,7 +267,7 @@ where
|
||||||
}); // TODO: handle timeout
|
}); // TODO: handle timeout
|
||||||
debug!("Got response bytes from {destination}");
|
debug!("Got response bytes from {destination}");
|
||||||
|
|
||||||
if status != 200 {
|
if !status.is_success() {
|
||||||
warn!(
|
warn!(
|
||||||
"{} {}: {}",
|
"{} {}: {}",
|
||||||
url,
|
url,
|
||||||
|
@ -283,7 +283,7 @@ where
|
||||||
.body(body)
|
.body(body)
|
||||||
.expect("reqwest body is valid http body");
|
.expect("reqwest body is valid http body");
|
||||||
|
|
||||||
if status == 200 {
|
if status.is_success() {
|
||||||
debug!("Parsing response bytes from {destination}");
|
debug!("Parsing response bytes from {destination}");
|
||||||
let response = T::IncomingResponse::try_from_http_response(http_response);
|
let response = T::IncomingResponse::try_from_http_response(http_response);
|
||||||
if response.is_ok() && write_destination_to_cache {
|
if response.is_ok() && write_destination_to_cache {
|
||||||
|
|
|
@ -97,7 +97,7 @@ impl Service {
|
||||||
Vec::new().into()
|
Vec::new().into()
|
||||||
}); // TODO: handle timeout
|
}); // TODO: handle timeout
|
||||||
|
|
||||||
if status != 200 {
|
if !status.is_success() {
|
||||||
info!(
|
info!(
|
||||||
"Push gateway returned bad response {} {}\n{}\n{:?}",
|
"Push gateway returned bad response {} {}\n{}\n{:?}",
|
||||||
destination,
|
destination,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue