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

result.statusCode: 0 being returned by many external links #220

Open
chris-dura opened this issue Sep 29, 2022 · 3 comments
Open

result.statusCode: 0 being returned by many external links #220

chris-dura opened this issue Sep 29, 2022 · 3 comments

Comments

@chris-dura
Copy link

I've recently started getting a result.statusCode: 0 returned when checking my markdown files.

'use strict';

/**
 * @fileoverview This is a stub test to use the `markdown-link-check` library directly,
 * to test whether the problem is truly with `markdown-link-check`,
 * or the underlying `link-check` library
 */

const markdownLinkCheck = require('markdown-link-check');

markdownLinkCheck('[example](http://google.com)', function (err, results) {
	if (err) {
		console.error('Error', err);
		return;
	}
	results.forEach(function (result) {
		console.log('%s is %s', result.link, result.status, result.statusCode);
	});
});

markdownLinkCheck('[example](https://dequeuniversity.com/screenreaders/voiceover-keyboard-shortcuts)', function (err, results) {
	if (err) {
		console.error('Error', err);
		return;
	}
	results.forEach(function (result) {
		console.log('%s is %s', result.link, result.status, result.statusCode);
	});
});


// output:
// http://google.com is alive 200
// https://dequeuniversity.com/screenreaders/voiceover-keyboard-shortcuts is dead 0

Is this perhaps related to tcort/link-check#47 (comment)?

@mtojek
Copy link

mtojek commented Dec 6, 2022

Hey @tcort! Do you think that it would be feasible to introduce a generic retry parameter? In coder/coder we can observe some transient network issues which could be fixed with a simple retry/backoff mechanism.

@Zvikan
Copy link

Zvikan commented Dec 12, 2022

We also observe similar issues with status code 0 for some links, a manual retry to our GH action usually fix it, would prefer to have the markdown link checker make that retry.

@codefromthecrypt
Copy link

codefromthecrypt pushed a commit to openzipkin/zipkin that referenced this issue Jan 14, 2024
codefromthecrypt pushed a commit to openzipkin/zipkin that referenced this issue Jan 14, 2024
codefromthecrypt added a commit to openzipkin/zipkin that referenced this issue Jan 14, 2024
This adds new scripts configure_lint and lint which work like our other build-bin scripts. These lint the workflow yaml and our markdown links.

I also removed the separate step for javadoc checking as it is easy to do that in the release test target, as well uses less resources vs doing it twice.

This disables one link per tcort/markdown-link-check#220

Signed-off-by: Adrian Cole <[email protected]>
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

4 participants