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
* @param {number} statusCode - The HTTP status code.
101
+
* @returns {string} - The description of the status code.
102
+
*/
103
+
functiongetErrorDescription(statusCode){
104
+
constdescriptions={
105
+
400: 'Bad Request - The server could not understand the request.',
106
+
401: 'Unauthorized - Authentication is required and has failed or has not been provided.',
107
+
403: 'Forbidden - The server understood the request, but refuses to authorize it.',
108
+
404: 'Not Found - The server cannot find the requested resource.',
109
+
500: 'Internal Server Error - The server has encountered a situation it doesn\'t know how to handle.',
110
+
502: 'Bad Gateway - The server was acting as a gateway or proxy and received an invalid response.',
111
+
503: 'Service Unavailable - The server is not ready to handle the request.',
112
+
504: 'Gateway Timeout - The server was acting as a gateway or proxy and did not receive a response in time.',
113
+
405: 'Method Not Allowed - The method specified in the Request-Line is not allowed for the resource.',
114
+
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
+
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
+
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
121
+
};
122
+
123
+
returndescriptions[statusCode]||'Unknown error, look up status code for details';
124
+
}
125
+
94
126
/**
95
127
* Main function to execute the link checking process.
0 commit comments