Skip to content
Snippets Groups Projects
Commit b40ccfbb authored by Ryan Gonzalez's avatar Ryan Gonzalez Committed by Emanuele Aina
Browse files

Fix incorrect handling of HTTP error statuses

All non-2xx statuses were actually being ignored, because status codes
aren't propagated as errors by default.

https://phabricator.apertis.org/T8593



Signed-off-by: default avatarRyan Gonzalez <ryan.gonzalez@collabora.com>
parent 782a8f0c
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@ impl Client {
// NOTE: the URL should be printed since get() is instrumented.
debug!("GET");
Ok(self.client.get(url.clone()).send().await?.bytes().await?)
Ok(self.client.get(url.clone()).send().await?.error_for_status()?.bytes().await?)
}
#[instrument(skip(self))]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment