From 31538fac24f96812d4971a31626d5d95a3b9bdc9 Mon Sep 17 00:00:00 2001 From: Froidefond Julien Date: Wed, 25 Mar 2026 09:06:34 +0100 Subject: [PATCH] fix: abort reading_status_match job on AniList 429 rate limit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Continuing after a 429 is pointless — all subsequent requests will also fail. The job now returns Err immediately, which sets status='failed' with a clear message indicating where it stopped. Co-Authored-By: Claude Sonnet 4.6 --- apps/api/src/reading_status_match.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/api/src/reading_status_match.rs b/apps/api/src/reading_status_match.rs index 58902fc..5f4af06 100644 --- a/apps/api/src/reading_status_match.rs +++ b/apps/api/src/reading_status_match.rs @@ -369,6 +369,11 @@ pub(crate) async fn process_reading_status_match( insert_result(pool, job_id, library_id, series_name, "ambiguous", None, None, None, None).await; } Err(e) => { + if e.contains("429") || e.contains("Too Many Requests") { + return Err(format!( + "AniList rate limit exceeded (429) — job stopped after {processed}/{total} series" + )); + } warn!("[READING_STATUS_MATCH] series '{series_name}': {e}"); insert_result(pool, job_id, library_id, series_name, "error", None, None, None, Some(&e)).await; }