Skip to content
This repository has been archived by the owner on Jan 21, 2023. It is now read-only.

Commit

Permalink
Fix missing error checks
Browse files Browse the repository at this point in the history
ureq always converts HTTP errors to errors, reqwest does not. Missed in the transition.
  • Loading branch information
AlyoshaVasilieva committed Jul 8, 2021
1 parent 773f467 commit 80cfcf2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "city17"
version = "0.5.1"
version = "0.5.2"
authors = ["Malloc Voidstar <[email protected]>"]
edition = "2018"
resolver = "2"
Expand Down
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ async fn get_m3u8(url: &str, token: PlaybackAccessToken) -> Result<String, Error
.query(&token.gen_query(&p, &generate_id().to_lowercase()))
.send()
.await?
.error_for_status()?
.text()
.await
.map_err(|e| e.into())
Expand Down Expand Up @@ -217,6 +218,7 @@ async fn get_access_token(var: &Variables) -> Result<AccessTokenResponse, Error>
.json(&request)
.send()
.await?
.error_for_status()?
.json()
.await
.map_err(|e| e.into())
Expand Down

0 comments on commit 80cfcf2

Please sign in to comment.