mirror of
https://github.com/OMGeeky/exponential_backoff.git
synced 2026-01-04 02:25:26 +01:00
change to return an Err on an unknown status code instead of Ok
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user