Skip to content
Snippets Groups Projects
Commit b4e469d0 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 62fc8743
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !111. Comments created here will be created in the context of that merge request.
......@@ -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