Skip to content

Commit

Permalink
429 codes are now handled
Browse files Browse the repository at this point in the history
  • Loading branch information
justindhillon committed Jan 30, 2024
1 parent 84b3f91 commit 867aac3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion checkLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +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 false positive, return false
if (err.response.status === 999) return false;
if (err.response.status === 429) return false;

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

0 comments on commit 867aac3

Please sign in to comment.