From 80cfcf2cc1b987978a2032585b780a631d3fbce9 Mon Sep 17 00:00:00 2001 From: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com> Date: Thu, 8 Jul 2021 02:02:48 -0700 Subject: [PATCH] Fix missing error checks ureq always converts HTTP errors to errors, reqwest does not. Missed in the transition. --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 959cc34..c57795f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -116,7 +116,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "city17" -version = "0.5.1" +version = "0.5.2" dependencies = [ "once_cell", "pcg_rand", diff --git a/Cargo.toml b/Cargo.toml index 757cb57..6f4a07f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "city17" -version = "0.5.1" +version = "0.5.2" authors = ["Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>"] edition = "2018" resolver = "2" diff --git a/src/main.rs b/src/main.rs index e184dbb..c56c770 100644 --- a/src/main.rs +++ b/src/main.rs @@ -147,6 +147,7 @@ async fn get_m3u8(url: &str, token: PlaybackAccessToken) -> Result Result .json(&request) .send() .await? + .error_for_status()? .json() .await .map_err(|e| e.into())