You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.log(`🔴 [${result.status_code||'N/A'}] ${link} in file: ${relativeFilePath}`);
81
-
deadLinks.push({
96
+
constdeadLink={
82
97
link: result.link,
83
98
status_code: result.status_code,
84
99
file: relativeFilePath,
85
100
error: result.error,
86
101
error_description: errorDescription
87
-
});
102
+
};
103
+
awaitappendDeadLinkToFile(deadLink);
88
104
counters.deadLinks+=1;
89
105
}else{
90
106
console.log(`✅ [OK] ${link} in file: ${relativeFilePath}`);
@@ -112,12 +128,9 @@ function getErrorDescription(statusCode) {
112
128
504: 'Gateway Timeout - The server was acting as a gateway or proxy and did not receive a response in time.',
113
129
405: 'Method Not Allowed - The method specified in the Request-Line is not allowed for the resource.',
114
130
429: 'Too Many Requests - The user has sent too many requests in a given amount of time.',
115
-
503: 'Service Unavailable - The server is currently unavailable (overloaded or down).',
116
-
504: 'Gateway Timeout - The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request.',
117
131
505: 'HTTP Version Not Supported - The server does not support, or refuses to support, the major version of HTTP that was used in the request message.',
118
132
511: 'Network Authentication Required - The client needs to authenticate to gain network access.',
119
-
599: 'Network Connect Timeout Error - Can be cause by a network issue or a server-side issue.',
120
-
// Add more descriptions as needed
133
+
599: 'Network Connect Timeout Error - Can be caused by a network issue or a server-side issue.',
121
134
};
122
135
123
136
returndescriptions[statusCode]||'Unknown error, look up status code for details';
0 commit comments