Skip to content

Commit f7e9f49

Browse files
jasonjohCopilot
andauthored
Update link validation test to use HEAD (#1249)
* Update to use `HEAD` Also added `console.log` line to help debug any future errors Fixes #1248 * Update tests/validator.js Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent 63a8135 commit f7e9f49

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/validator.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ function validateJson (query, isValidJson) {
2020

2121
async function validateLink (linkUrl) {
2222
try {
23-
const response = await fetch(linkUrl);
23+
const response = await fetch(linkUrl, { method: 'HEAD' });
2424
return response.ok;
2525
} catch (error) {
26+
console.error(JSON.stringify(error, null, 2));
2627
return false;
2728
}
2829
}

0 commit comments

Comments
 (0)