lycheeverse / lychee

⚡ Fast, async, stream-based link checker written in Rust. Finds broken URLs and mail addresses inside Markdown, HTML, reStructuredText, websites and more!
https://lychee.cli.rs
Apache License 2.0
2.11k stars 126 forks source link

accept 429 code not taken in account #1340

Closed nvuillam closed 9 months ago

nvuillam commented 9 months ago

With 0.14.0

lychee.toml contains

# Comma-separated list of accepted status codes for valid links.
accept = ["200", "206", "429"]

But results considers as errors 429 status codes


....
  ✗ [429] https://github.com/bdovaz | Failed: Network error: Too Many Requests
  ✗ [429] https://github.com/cgbosse | Failed: Network error: Too Many Requests
  ✗ [429] https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/editorconfig.md | Failed: Network error: Too Many Requests
  ✗ [429] https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/json_jsonlint.md | Failed: Network error: Too Many Requests
  ✗ [429] https://github.com/oxsecurity/megalinter/blob/main/docs/assets/images/GitHubCommentReporter.jpg?raw=true%3E | Failed: Network error: Too Many Requests
  ✗ [429] https://github.com/terraform-linters/tflint | Failed: Network error: Too Many Requests
  ✗ [429] https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/vbdotnet_dotnet_format.md | Failed: Network error: Too Many Requests
  ✗ [429] https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/go.md | Failed: Network error: Too Many Requests
  ✗ [429] https://github.com/oxsecurity/megalinter/tree/main/docs/config-postcommands.md | Failed: Network error: Too Many Requests
  ✗ [429] https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/html_htmlhint.md | Failed: Network error: Too Many Requests
  ✗ [429] https://github.com/super-linter/super-linter/pulls?q=is%3Apr+is%3Aclosed+author%3Anvuillam+review%3Aapproved | Failed: Network error: Too Many Requests

....

  📝 Summary
  ---------------------
  🔍 Total.........2290
  ✅ Successful....1441
  ⏳ Timeouts.........0
  🔀 Redirected.......0
  👻 Excluded.......425
  ❓ Unknown..........0
  🚫 Errors.........424
mre commented 9 months ago

@Techassi, any ideas?

Techassi commented 9 months ago

Well, this seems rather interesting. I will look into it.

Techassi commented 9 months ago

This will be fixed by #1344.

This is a one-line change that took me 1,5h to debug. My first thought was that our parsing is messed up (which it isn't), but the option set in the TOML config file never got used... :/

nvuillam commented 9 months ago

@Techassi great, thanks :)

mre commented 9 months ago

New release out.