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.21k stars 134 forks source link

Expose more details when an `ERROR` happens #1569

Closed alessio-locatelli closed 2 hours ago

alessio-locatelli commented 5 hours ago

Version

lycheeverse/lychee:sha-18d486d-alpine@sha256:bb2a23d44ac713aaeea3def850dc6a2b2c57ba6dfba7f730c0088f670916345a

Command example

lychee --exclude-path docs/broken.md --accept '200..=204,403,429,500,503' -vv 'docs/**/*.md' '**/*.yaml' '*.toml'

Problem

The log says "Find details below"... but all the details is the ERROR word. It is difficult for a user to debug what has happened here.

   [ERROR] https://www.privacyguides.org/en/news-aggregators/
Issues found in 1 input. Find details below.
[docs/tutorial.md]:
   [ERROR] https://www.privacyguides.org/en/news-aggregators/
🔍 357 Total (in 9s) ✅ 354 OK 🚫 1 Error

ERROR: Job failed: command terminated with exit code 2

Expected behavior

Log the full traceback or a network error, not just the ERROR word.

mre commented 2 hours ago

This should be fixed in master with https://github.com/lycheeverse/lychee/pull/1553. It will be released in 0.17.1 when this gets merged: https://github.com/lycheeverse/lychee/pull/1554. In the meantime, can you try the latest master build and see if that resolves the issue?

alessio-locatelli commented 2 hours ago

This should be fixed in master with https://github.com/lycheeverse/lychee/pull/1553. It will be released in 0.17.1 when this gets merged: https://github.com/lycheeverse/lychee/pull/1554.

Sorry, I checked the issues, but not recently merged pull requests.

In the meantime, can you try the latest master build and see if that resolves the issue?

To be honest, I have no idea how to reproduce the error, as there were no details in the log, so I can only guess at what could go wrong. For example, the URL I show here was working, but lychee just said ERROR and I cannot know why.

Thank you for your reply. I will re-open the issue if I get this problem again after 0.17.1.