All files / utilities http-status-codes.ts

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431        1x                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
/**
 * A collection of HTTP status codes with their messages and descriptions.
 * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
 */
export const HttpStatusCodes: Record<string, { code: number; message: string; description: string }> = {
	"100": {
		"code": 100,
		"message": "Continue",
		"description": "The server has received the request headers, and the client should proceed to send the request body."
	},
	"101": {
		"code": 101,
		"message": "Switching Protocols",
		"description": "The requester has asked the server to switch protocols."
	},
	"102": {
		"code": 102,
		"message": "Processing",
		"description": "This code indicates that the server has received and is processing the request, but no response is available yet. This prevents the client from timing out and assuming the request was lost."
	},
	"103": {
		"code": 103,
		"message": "Early Hints",
		"description": "Used to return some response headers before final HTTP message."
	},
	"200": {
		"code": 200,
		"message": "OK",
		"description": "The request is OK (this is the standard response for successful HTTP requests)."
	},
	"201": {
		"code": 201,
		"message": "Created",
		"description": "The request has been fulfilled, and a new resource is created."
	},
	"202": {
		"code": 202,
		"message": "Accepted",
		"description": "The request has been accepted for processing, but the processing has not been completed."
	},
	"203": {
		"code": 203,
		"message": "Non-Authoritative Information",
		"description": "The request has been successfully processed, but is returning information that may be from another source."
	},
	"204": {
		"code": 204,
		"message": "No Content",
		"description": "The request has been successfully processed, but is not returning any content."
	},
	"205": {
		"code": 205,
		"message": "Reset Content",
		"description": "The request has been successfully processed, but is not returning any content, and requires that the requester reset the document view."
	},
	"206": {
		"code": 206,
		"message": "Partial Content",
		"description": "The server is delivering only part of the resource due to a range header sent by the client."
	},
	"207": {
		"code": 207,
		"message": "Multi-Status",
		"description": "The message body that follows is by default an XML message and can contain a number of separate response codes, depending on how many sub-requests were made."
	},
	"208": {
		"code": 208,
		"message": "Already Reported",
		"description": "The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response, and are not being included again."
	},
	"218": {
		"code": 218,
		"message": "This is fine (Apache Web Server)",
		"description": "Used as a catch-all error condition for allowing response bodies to flow through Apache when ProxyErrorOverride is enabled."
	},
	"226": {
		"code": 226,
		"message": "IM Used",
		"description": "The server has fulfilled a request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance."
	},
	"300": {
		"code": 300,
		"message": "Multiple Choices",
		"description": "A link list. The user can select a link and go to that location. Maximum five addresses."
	},
	"301": {
		"code": 301,
		"message": "Moved Permanently",
		"description": "The requested page has moved to a new URL."
	},
	"302": {
		"code": 302,
		"message": "Found",
		"description": "The requested page has moved temporarily to a new URL."
	},
	"303": {
		"code": 303,
		"message": "See Other",
		"description": "The requested page can be found under a different URL."
	},
	"304": {
		"code": 304,
		"message": "Not Modified",
		"description": "Indicates the requested page has not been modified since last requested."
	},
	"306": {
		"code": 306,
		"message": "Switch Proxy",
		"description": "No longer used. Originally meant \"Subsequent requests should use the specified proxy.\""
	},
	"307": {
		"code": 307,
		"message": "Temporary Redirect",
		"description": "The requested page has moved temporarily to a new URL."
	},
	"308": {
		"code": 308,
		"message": "Resume Incomplete",
		"description": "Used in the resumable requests proposal to resume aborted PUT or POST requests."
	},
	"400": {
		"code": 400,
		"message": "Bad Request",
		"description": "The request cannot be fulfilled due to bad syntax."
	},
	"401": {
		"code": 401,
		"message": "Unauthorized",
		"description": "The request was a legal request, but the server is refusing to respond to it. For use when authentication is possible but has failed or not yet been provided."
	},
	"402": {
		"code": 402,
		"message": "Payment Required",
		"description": "Not yet implemented by RFC standards, but reserved for future use."
	},
	"403": {
		"code": 403,
		"message": "Forbidden",
		"description": "The request was a legal request, but the server is refusing to respond to it."
	},
	"404": {
		"code": 404,
		"message": "Not Found",
		"description": "The requested page could not be found but may be available again in the future."
	},
	"405": {
		"code": 405,
		"message": "Method Not Allowed",
		"description": "A request was made of a page using a request method not supported by that page."
	},
	"406": {
		"code": 406,
		"message": "Not Acceptable",
		"description": "The server can only generate a response that is not accepted by the client."
	},
	"407": {
		"code": 407,
		"message": "Proxy Authentication Required",
		"description": "The client must first authenticate itself with the proxy."
	},
	"408": {
		"code": 408,
		"message": "Request Timeout",
		"description": "The server timed out waiting for the request."
	},
	"409": {
		"code": 409,
		"message": "Conflict",
		"description": "The request could not be completed because of a conflict in the request."
	},
	"410": {
		"code": 410,
		"message": "Gone",
		"description": "The requested page is no longer available."
	},
	"411": {
		"code": 411,
		"message": "Length Required",
		"description": "The \"Content-Length\" is not defined. The server will not accept the request without it."
	},
	"412": {
		"code": 412,
		"message": "Precondition Failed",
		"description": "The precondition given in the request evaluated to false by the server."
	},
	"413": {
		"code": 413,
		"message": "Request Entity Too Large",
		"description": "The server will not accept the request, because the request entity is too large."
	},
	"414": {
		"code": 414,
		"message": "Request-URI Too Long",
		"description": "The server will not accept the request, because the URL is too long. Occurs when you convert a POST request to a GET request with a long query information."
	},
	"415": {
		"code": 415,
		"message": "Unsupported Media Type",
		"description": "The server will not accept the request, because the media type is not supported."
	},
	"416": {
		"code": 416,
		"message": "Requested Range Not Satisfiable",
		"description": "The client has asked for a portion of the file, but the server cannot supply that portion."
	},
	"417": {
		"code": 417,
		"message": "Expectation Failed",
		"description": "The server cannot meet the requirements of the Expect request-header field."
	},
	"418": {
		"code": 418,
		"message": "I'm a teapot",
		"description": "Any attempt to brew coffee with a teapot should result in the error code \"418 I'm a teapot\". The resulting entity body MAY be short and stout."
	},
	"419": {
		"code": 419,
		"message": "Page Expired (Laravel Framework)",
		"description": "Used by the Laravel Framework when a CSRF Token is missing or expired."
	},
	"420": {
		"code": 420,
		"message": "Method Failure (Spring Framework)",
		"description": "A deprecated response used by the Spring Framework when a method has failed."
	},
	"421": {
		"code": 421,
		"message": "Misdirected Request",
		"description": "The request was directed at a server that is not able to produce a response (for example because a connection reuse)."
	},
	"422": {
		"code": 422,
		"message": "Unprocessable Entity",
		"description": "The request was well-formed but was unable to be followed due to semantic errors."
	},
	"423": {
		"code": 423,
		"message": "Locked",
		"description": "The resource that is being accessed is locked."
	},
	"424": {
		"code": 424,
		"message": "Failed Dependency",
		"description": "The request failed due to failure of a previous request (e.g., a PROPPATCH)."
	},
	"426": {
		"code": 426,
		"message": "Upgrade Required",
		"description": "The client should switch to a different protocol such as TLS\/1.0, given in the Upgrade header field."
	},
	"428": {
		"code": 428,
		"message": "Precondition Required",
		"description": "The origin server requires the request to be conditional."
	},
	"429": {
		"code": 429,
		"message": "Too Many Requests",
		"description": "The user has sent too many requests in a given amount of time. Intended for use with rate limiting schemes."
	},
	"431": {
		"code": 431,
		"message": "Request Header Fields Too Large",
		"description": "The server is unwilling to process the request because either an individual header field, or all the header fields collectively, are too large."
	},
	"440": {
		"code": 440,
		"message": "Login Time-out",
		"description": "The client's session has expired and must log in again. (IIS)"
	},
	"444": {
		"code": 444,
		"message": "Connection Closed Without Response",
		"description": "A non-standard status code used to instruct nginx to close the connection without sending a response to the client, most commonly used to deny malicious or malformed requests."
	},
	"449": {
		"code": 449,
		"message": "Retry With",
		"description": "The server cannot honour the request because the user has not provided the required information. (IIS)"
	},
	"450": {
		"code": 450,
		"message": "Blocked by Windows Parental Controls",
		"description": "The Microsoft extension code indicated when Windows Parental Controls are turned on and are blocking access to the requested webpage."
	},
	"451": {
		"code": 451,
		"message": "Unavailable For Legal Reasons",
		"description": "A server operator has received a legal demand to deny access to a resource or to a set of resources that includes the requested resource."
	},
	"494": {
		"code": 494,
		"message": "Request Header Too Large",
		"description": "Used by nginx to indicate the client sent too large of a request or header line that is too long."
	},
	"495": {
		"code": 495,
		"message": "SSL Certificate Error",
		"description": "An expansion of the 400 Bad Request response code, used when the client has provided an invalid client certificate."
	},
	"496": {
		"code": 496,
		"message": "SSL Certificate Required",
		"description": "An expansion of the 400 Bad Request response code, used when a client certificate is required but not provided."
	},
	"497": {
		"code": 497,
		"message": "HTTP Request Sent to HTTPS Port",
		"description": "An expansion of the 400 Bad Request response code, used when the client has made a HTTP request to a port listening for HTTPS requests."
	},
	"498": {
		"code": 498,
		"message": "Invalid Token (Esri)",
		"description": "Returned by ArcGIS for Server. Code 498 indicates an expired or otherwise invalid token."
	},
	"499": {
		"code": 499,
		"message": "Client Closed Request",
		"description": "A non-standard status code introduced by nginx for the case when a client closes the connection while nginx is processing the request."
	},
	"500": {
		"code": 500,
		"message": "Internal Server Error",
		"description": "An error has occurred in a server side script, a no more specific message is suitable."
	},
	"501": {
		"code": 501,
		"message": "Not Implemented",
		"description": "The server either does not recognize the request method, or it lacks the ability to fulfill the request."
	},
	"502": {
		"code": 502,
		"message": "Bad Gateway",
		"description": "The server was acting as a gateway or proxy and received an invalid response from the upstream server."
	},
	"503": {
		"code": 503,
		"message": "Service Unavailable",
		"description": "The server is currently unavailable (overloaded or down)."
	},
	"504": {
		"code": 504,
		"message": "Gateway Timeout",
		"description": "The server was acting as a gateway or proxy and did not receive a timely response from the upstream server."
	},
	"505": {
		"code": 505,
		"message": "HTTP Version Not Supported",
		"description": "The server does not support the HTTP protocol version used in the request."
	},
	"506": {
		"code": 506,
		"message": "Variant Also Negotiates",
		"description": "Transparent content negotiation for the request results in a circular reference."
	},
	"507": {
		"code": 507,
		"message": "Insufficient Storage",
		"description": "The server is unable to store the representation needed to complete the request."
	},
	"508": {
		"code": 508,
		"message": "Loop Detected",
		"description": "The server detected an infinite loop while processing the request (sent instead of 208 Already Reported)."
	},
	"509": {
		"code": 509,
		"message": "Bandwidth Limit Exceeded",
		"description": "The server has exceeded the bandwidth specified by the server administrator; this is often used by shared hosting providers to limit the bandwidth of customers."
	},
	"510": {
		"code": 510,
		"message": "Not Extended",
		"description": "Further extensions to the request are required for the server to fulfil it."
	},
	"511": {
		"code": 511,
		"message": "Network Authentication Required",
		"description": "The client needs to authenticate to gain network access."
	},
	"520": {
		"code": 520,
		"message": "Unknown Error",
		"description": "The 520 error is used as a \"catch-all response for when the origin server returns something unexpected\", listing connection resets, large headers, and empty or invalid responses as common triggers."
	},
	"521": {
		"code": 521,
		"message": "Web Server Is Down",
		"description": "The origin server has refused the connection from Cloudflare."
	},
	"522": {
		"code": 522,
		"message": "Connection Timed Out",
		"description": "Cloudflare could not negotiate a TCP handshake with the origin server."
	},
	"523": {
		"code": 523,
		"message": "Origin Is Unreachable",
		"description": "Cloudflare could not reach the origin server; for example, if the DNS records for the origin server are incorrect."
	},
	"524": {
		"code": 524,
		"message": "A Timeout Occurred",
		"description": "Cloudflare was able to complete a TCP connection to the origin server, but did not receive a timely HTTP response."
	},
	"525": {
		"code": 525,
		"message": "SSL Handshake Failed",
		"description": "Cloudflare could not negotiate a SSL/TLS handshake with the origin server."
	},
	"526": {
		"code": 526,
		"message": "Invalid SSL Certificate",
		"description": "Used by Cloudflare and Cloud Foundry's gorouter to indicate failure to validate the SSL/TLS certificate that the origin server presented."
	},
	"527": {
		"code": 527,
		"message": "Railgun Listener to Origin Error",
		"description": "Error 527 indicates that the request timed out or failed after the WAN connection had been established."
	},
	"530": {
		"code": 530,
		"message": "Origin DNS Error",
		"description": "Error 530 indicates that the requested host name could not be resolved on the Cloudflare network to an origin server."
	},
	"598": {
		"code": 598,
		"message": "Network Read Timeout Error",
		"description": "Used by some HTTP proxies to signal a network read timeout behind the proxy to a client in front of the proxy."
	}
};