Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug output for CSV failureDetails column appears incorrect #570

Closed
nk9 opened this issue Oct 3, 2023 · 3 comments · Fixed by #613
Closed

Debug output for CSV failureDetails column appears incorrect #570

nk9 opened this issue Oct 3, 2023 · 3 comments · Fixed by #613
Labels
bug Something isn't working released

Comments

@nk9
Copy link

nk9 commented Oct 3, 2023

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.

@nk9 nk9 changed the title CSV shows [object Object] in failureDetails Debug output for CSV failureDetails column appears incorrect Oct 3, 2023
@nk9
Copy link
Author

nk9 commented Jan 1, 2024

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.

@JustinBeckwith
Copy link
Owner

@nk9 I just released a build that tries to fix this - want to have a look and see if it does what you expect?

Copy link

github-actions bot commented Jul 2, 2024

🎉 This issue has been resolved in version 6.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants