Skip to content

Commit 3b45ff3

Browse files
committed
Remove a panic
1 parent d9cce65 commit 3b45ff3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/riot_utils.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ macro_rules! riot_api {
1313
match result {
1414
Result::Err(mut e) => {
1515
let status_code = { e.status_code().clone() };
16-
error!("Error: {:?}", e);
1716
return match status_code {
1817
None => Result::Err(anyhow!(
1918
"{}",
@@ -26,7 +25,9 @@ macro_rules! riot_api {
2625
None => String::from("<no response>"),
2726
}
2827
)),
29-
Some(http::status::StatusCode::FORBIDDEN) => panic!("The Riot Key is bad."),
28+
Some(http::status::StatusCode::FORBIDDEN) => {
29+
error!("The Riot Key is bad, or riot cooked the api again.")
30+
}
3031
Some(http::status::StatusCode::TOO_MANY_REQUESTS) => match e.take_response() {
3132
Some(r) => {
3233
let wait_time = Duration::from_secs(

0 commit comments

Comments
 (0)