diff --git a/src/main.rs b/src/main.rs index 3208575..da980b8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -94,6 +94,7 @@ async fn handler(cfg: &Config, s: &mut State) -> Result<(), reqwest::Error> { ]) .send() .await? + .error_for_status()? .json::() .await? .result; @@ -112,6 +113,7 @@ async fn handler(cfg: &Config, s: &mut State) -> Result<(), reqwest::Error> { { let mut args = text.split_whitespace(); args.next(); // skip command name + match args.next()? { "ru" => { let comic_id = args.next()?.parse::().ok()?;