mirror of
https://github.com/TabbyML/tabby
synced 2024-11-22 00:08:06 +00:00
chore: handle 429 Too Many Requests status code in crawl_url function (#2539)
This commit is contained in:
parent
c3e9f624b2
commit
894a4c6c7c
@ -54,6 +54,10 @@ async fn crawl_url(start_url: &str) -> anyhow::Result<impl Stream<Item = KatanaR
|
||||
}
|
||||
};
|
||||
|
||||
if data.response.status_code == Some(429) {
|
||||
logkit::warn!("429 Too Many Requests, consider adjust your rate limit settings...");
|
||||
}
|
||||
|
||||
// Skip if the status code is not 200
|
||||
if data.response.status_code != Some(200) {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user