Use case
Lychee currently retries every 5xx code (per RetryExt for StatusCode). For some 5xx codes, notably Cloudflare's CDN-specific ones like 521 Web Server Down, 523 Origin Unreachable, 525 SSL Handshake Failed, and 530 Origin DNS Error / bot block, the underlying condition is typically on a minutes-to-hours scale. A within-seconds exponential-backoff retry has near-zero chance of changing the outcome but consumes the retry budget anyway.
accept is a partial workaround but conflates "transient, pass silently" with "non-retriable, fail fast". Many users want the latter without the former: the URL should still appear in the error report so the operator can investigate, but lychee shouldn't waste the retry budget on it.
Proposal
A subtractive config option that removes codes from the built-in retry classification:
# Status codes to skip retrying (subtracted from built-in retry defaults).
# Useful for codes whose recovery time exceeds typical retry windows
# (e.g., Cloudflare 521/523/525/530 origin-side failures).
retry_skip_status_codes = [521, 523, 525, 530]
A matching CLI flag --retry-skip-status-codes 521,523,525,530 would mirror it. Default-empty preserves current behavior.
Why subtractive (not just accept)
accept reclassifies a code as success, so the URL never appears in the error list. That is the wrong tool when the operator wants to know the URL failed (to investigate later) but does not want lychee to waste the retry budget on it now.
Use case
Lychee currently retries every 5xx code (per
RetryExt for StatusCode). For some 5xx codes, notably Cloudflare's CDN-specific ones like 521 Web Server Down, 523 Origin Unreachable, 525 SSL Handshake Failed, and 530 Origin DNS Error / bot block, the underlying condition is typically on a minutes-to-hours scale. A within-seconds exponential-backoff retry has near-zero chance of changing the outcome but consumes the retry budget anyway.acceptis a partial workaround but conflates "transient, pass silently" with "non-retriable, fail fast". Many users want the latter without the former: the URL should still appear in the error report so the operator can investigate, but lychee shouldn't waste the retry budget on it.Proposal
A subtractive config option that removes codes from the built-in retry classification:
A matching CLI flag
--retry-skip-status-codes 521,523,525,530would mirror it. Default-empty preserves current behavior.Why subtractive (not just
accept)acceptreclassifies a code as success, so the URL never appears in the error list. That is the wrong tool when the operator wants to know the URL failed (to investigate later) but does not want lychee to waste the retry budget on it now.