-
-
Notifications
You must be signed in to change notification settings - Fork 195
Labels
Description
Problem
Currently, the --accept flag only supports HTTP status codes. There is no way to ignore connection-level errors like timeouts.
When checking links across a large site, some external URLs may intermittently timeout due to network conditions or slow servers. These transient failures cause CI to fail even though the links are valid.
Proposed Solution
Extend the accept configuration to support error types in addition to HTTP status codes. For example:
accept = [200, 429, "timeout"]Or add a separate option:
skip_errors = ["timeout", "dns"]Use Case
I run lychee in CI to check links in a blog with hundreds of posts. Some external sites occasionally timeout, causing the entire CI run to fail. I would like to:
- Report timeouts as warnings (not errors)
- Or ignore them entirely
Currently, the only workarounds are:
- Increasing timeout and retries (doesn't fully solve the problem)
- Excluding specific URLs (requires maintenance as new timeout-prone URLs appear)
- Post-processing lychee output in CI scripts
Alternatives Considered
- Excluding URLs via
.lycheeignore— requires knowing which URLs will timeout in advance - Increasing
timeoutandmax_retries— helps but doesn't eliminate the issue - Filtering output with grep in CI — fragile workaround
Reactions are currently unavailable