mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-09-23 23:32:05 +00:00
site::fetch retried every PixivError, so a bad/expired token (403) or a deleted artwork (404) burned all 3 attempts with backoff against pixiv's API for nothing. Add PixivError::Status(u16) — the app-API calls now surface the HTTP status — and retry only the transient classes: network errors, 429 and 5xx. 4xx / Api (token errors) / Json / NoAuth are returned immediately. The classification is a pure helper (fetch_error_is_retryable) with unit tests.