From 23fb34b85b83beaf308fa8c66552d4e8709dcc3b Mon Sep 17 00:00:00 2001 From: OMGeeky Date: Thu, 1 Jun 2023 22:29:43 +0200 Subject: [PATCH] change to return an Err on an unknown status code instead of Ok --- Cargo.toml | 2 +- src/twitch.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 180fbbe..c15bb10 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "exponential_backoff" -version = "0.2.0" +version = "0.2.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/twitch.rs b/src/twitch.rs index b78b4d9..cdced89 100644 --- a/src/twitch.rs +++ b/src/twitch.rs @@ -113,7 +113,7 @@ pub async fn check_backoff_twitch_with_client( _ => { warn!("Unhandled status code: {}", status_code); // todo!("Handle other errors") - return Ok(response); + return Err(format!("got an unhandled status code: {} in response: {:?}" , status_code, response).into()); } } }