Skip to content

Commit

Permalink
error code 999 is a valid link
Browse files Browse the repository at this point in the history
  • Loading branch information
justindhillon committed Jan 27, 2024
1 parent 1b1ea61 commit 1cd8fd3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions checkLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ export async function checkLink(link: string): Promise<boolean> {
try {
await axios.head(link, params);
} catch (err: any) {
// If blocking bots, return false
if (err.response.status === 999) return false;

// If HEAD is not allowed try GET
if (err.response.status === 405) {
try {
Expand Down

0 comments on commit 1cd8fd3

Please sign in to comment.