change to return an Err on an unknown status code instead of Ok

This commit is contained in:
OMGeeky
2023-06-01 22:29:43 +02:00
parent 706558530b
commit 23fb34b85b
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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());
}
}
}