Skip to content

Commit 1cd8fd3

Browse files
committed
error code 999 is a valid link
1 parent 1b1ea61 commit 1cd8fd3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

checkLink.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ export async function checkLink(link: string): Promise<boolean> {
2020
try {
2121
await axios.head(link, params);
2222
} catch (err: any) {
23+
// If blocking bots, return false
24+
if (err.response.status === 999) return false;
25+
2326
// If HEAD is not allowed try GET
2427
if (err.response.status === 405) {
2528
try {

0 commit comments

Comments
 (0)