mirror of
https://github.com/redlib-org/redlib.git
synced 2025-04-02 04:37:35 +03:00
fix(main): reduce rate limit check fail to warned error
This commit is contained in:
parent
a4f511f67e
commit
9f6b08cbb2
1 changed files with 7 additions and 4 deletions
11
src/main.rs
11
src/main.rs
|
@ -9,7 +9,7 @@ use std::str::FromStr;
|
|||
use futures_lite::FutureExt;
|
||||
use hyper::Uri;
|
||||
use hyper::{header::HeaderValue, Body, Request, Response};
|
||||
use log::info;
|
||||
use log::{info, warn};
|
||||
use once_cell::sync::Lazy;
|
||||
use redlib::client::{canonical_path, proxy, rate_limit_check, CLIENT};
|
||||
use redlib::server::{self, RequestExt};
|
||||
|
@ -151,9 +151,12 @@ async fn main() {
|
|||
info!("[✅] Rate limit check passed");
|
||||
}
|
||||
Err(e) => {
|
||||
log::error!(" Rate limit check failed: {}", e);
|
||||
println!("[❌] Rate limit check failed: {}", e);
|
||||
std::process::exit(1);
|
||||
let mut message = format!("Rate limit check failed: {}", e);
|
||||
message += "\nThis may cause issues with the rate limit.";
|
||||
message += "\nPlease report this error with the above information.";
|
||||
message += "\nhttps://github.com/redlib-org/redlib/issues/new?assignees=sigaloid&labels=bug&title=%F0%9F%90%9B+Bug+Report%3A+Rate+limit+mismatch";
|
||||
warn!("{}", message);
|
||||
eprintln!("{}", message);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue