Add 502 to accepted status codes in .lychee.toml#1236
Add 502 to accepted status codes in .lychee.toml#1236sbryngelson merged 1 commit intofix-docs-bugfrom
Conversation
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| # Comma-separated list of accepted status codes for valid links. | ||
| # accept = ["200", "206", "403", "429"] | ||
| accept = ["200", "429"] | ||
| accept = ["200", "429", "502"] |
There was a problem hiding this comment.
Adding HTTP 502 to the global accept list will cause Lychee to treat upstream gateway/server errors as valid links, which can mask genuinely broken or consistently failing documentation URLs. Consider keeping accept to success/expected throttling codes (e.g., 200/429) and instead mitigate transient 502s by increasing retries/backoff or excluding the specific host(s) that intermittently return 502 (via exclude) so real link regressions are still caught.
| accept = ["200", "429", "502"] | |
| accept = ["200", "429"] |
Sequence DiagramThe PR updates the link-checker config to accept HTTP 502 responses. The diagram shows the main success path where the link checker treats a 502 response as valid, preventing CI from marking the link as broken. sequenceDiagram
participant CI
participant LinkChecker
participant RemoteHost
CI->>LinkChecker: Run link validation for docs
LinkChecker->>RemoteHost: HTTP request for URL
RemoteHost-->>LinkChecker: 502 Bad Gateway
Note right of LinkChecker: .lychee.toml accepts 502 as valid
LinkChecker-->>CI: Report URL as accepted (no failure)
Generated by CodeAnt AI |
|
CodeAnt AI finished reviewing your PR. |
User description
Docs were occasionally spuriously failing before this...
Type of change
Checklist
CodeAnt-AI Description
Accept 502 responses as valid link status
What Changed
Impact
✅ Fewer false broken-link reports✅ Fewer CI documentation failures due to transient upstream errors✅ More stable link validation results💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.