status code error

This commit is contained in:
Robin Appelman 2021-08-11 15:02:17 +02:00
commit 6e13780297

View file

@ -42,7 +42,9 @@ async fn main() -> Result<()> {
if !feed.body.is_null() { if !feed.body.is_null() {
req = req.json(&feed.body); req = req.json(&feed.body);
} }
req.send().await?; if let Err(e) = req.send().await?.error_for_status() {
eprintln!("{:#}", e);
}
} }
Err(e) => eprintln!("{:#}", e), Err(e) => eprintln!("{:#}", e),
Ok(false) => {} Ok(false) => {}