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

Open
nk9 opened this issue Oct 3, 2023 · 1 comment
Open

Debug output for CSV failureDetails column appears incorrect #570

nk9 opened this issue Oct 3, 2023 · 1 comment

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant