Skip to content

Feature request: allow accepting/ignoring timeout errors #2053

@yegor256

Description

@yegor256

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:

  1. Report timeouts as warnings (not errors)
  2. 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 timeout and max_retries — helps but doesn't eliminate the issue
  • Filtering output with grep in CI — fragile workaround

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions