Conversation
Closes #149 - Add a 'Retry Policy' section to the Network Errors troubleshooting page - Include an SVG-icon table listing which error types are retried and which are not (based on the logic in lychee-lib/src/retry.rs) - Document the --max-retries and --retry-wait-time options with their defaults (3 and 1s) - Add 'Connection reset by server' as an example error message - Minor wording improvements throughout
katrinafyi
left a comment
There was a problem hiding this comment.
Looks good. I'm definitely not an expert on network error conditions, but the text looks fine and makes sense. I'm sure it will be helpful.
| | Connection Timeout | <Yes /> | Server didn't respond in time | | ||
| | Connection Reset | <Yes /> | Connection dropped unexpectedly | | ||
| | Connection Aborted | <Yes /> | Connection terminated mid-request | | ||
| | Incomplete Message | <Yes /> | Response cut off before completion | | ||
| | 4xx Client Errors | <No /> | 400, 401, 403, 404 (except 408, 429) | | ||
| | 2xx Success | <No /> | 200, 201, 204 | | ||
| | 3xx Redirects | <No /> | 301, 302 | | ||
| | Initial Connection Failure | <No /> | Can't reach server at all | |
There was a problem hiding this comment.
My networking knowledge is not so good. What's the difference between "Connection Timeout" and "Initial Connection Failure"? What would be an example of both?
There was a problem hiding this comment.
The key difference is: timeout = eventually gave up waiting, connection failure = immediately told you "no."
Connection timeout means the TCP connection was attempted, and the server acknowledged it (or at least a packet was sent), but the server then stopped responding mid-way and the client gave up waiting. Example: you start a request to https://example.com, the TCP handshake begins, but the server is overloaded and never sends a response back. After a while, lychee gives up.
Initial connection failure means the connection was never established in the first place. For example when trying to connect to https://localhost:9999 where nothing is listening. The OS replies instantly with "connection refused". Or a DNS lookup that returns no result.
Does that answer your question or should I change the wording in the docs?
There was a problem hiding this comment.
It does help, thanks! Maybe just add these cases to the examples column for those rows. Calling out DNS specifically would help a lot.
Co-authored-by: Kait <39479354+katrinafyi@users.noreply.github.com>
Closes #149
Summary
The network errors troubleshooting page previously had no information about whether lychee retries failed requests. This PR adds a dedicated Retry Policy section that answers the question from the issue.
Changes
## Retry Policysection with:lychee-lib/src/retry.rs### Configuring retriessub-section documenting--max-retries(default: 3) and--retry-wait-time(default: 1 s) with CLI and TOML examplesConnection reset by serveras an example error message (the exact error from the issue)