linkinator
linkinator copied to clipboard
Debug output for CSV failureDetails column appears incorrect
I am running linkinator like this:
linkinator http://localhost:1313 \
--recurse \
--verbosity debug \
--timeout 10000 \
--skip 'twitter.com' \
--format CSV > broken-links.csv
40x failures
When a link fails with a 40x, the CSV line looks like this:
url,status,state,parent,failureDetails
http://www.onetribetalent.co.uk/talent/joshua-styles/,404,BROKEN,http://localhost:1313/episode/66/bogs-and-moss/,[object Object]
I would expect a stringified JSON object here so I can have some idea of what the failure was about.
200, 0 failures
When a link fails with status 200 or 0, you can still get a failureDetails
which looks like this:
FetchError: network timeout at: https://www.imf.org/external/pubs/ft/fandd/basics/external.htm,FetchError: network timeout at: https://www.imf.org/external/pubs/ft/fandd/basics/external.htm,
That's not a copy/paste error on my part, the failureDetails column actually duplicates the error and includes extra commas.
Update on this: the failureDetails
column now contains nothing for 40x failures. I'd still expect to get some idea of what sort of failure was encountered. Otherwise, what's the point of this column?
I do see that the 200 failures now possibly look better:
FetchError: request to https://justimagine.co.uk/childrens-books-reviews/town-is-by-the-sea/ failed, reason: getaddrinfo ENOTFOUND justimagine.co.uk
I am not sure if code has changed, or if I'm just seeing a different type of HTTP error than the last time I tried this.
@nk9 I just released a build that tries to fix this - want to have a look and see if it does what you expect?
:tada: This issue has been resolved in version 6.1.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket: