Skip to main content

StatusCodes

const StatusCodes: Readonly<object>;

HTTP status codes and their corresponding descriptions. This object maps HTTP status code numbers to their standard textual descriptions. Each key represents an HTTP status code, and its corresponding value is the description. The keys are numeric values, and the values are strings.

const statusText = StatusCodes[501];
console.log(description); // 'Not Implemented'

Type declaration

100

readonly 100: "Continue" = 'Continue';

101

readonly 101: "Switching Protocols" = 'Switching Protocols';

102

readonly 102: "Processing" = 'Processing';

103

readonly 103: "Early Hints" = 'Early Hints';

200

readonly 200: "OK" = 'OK';

201

readonly 201: "Created" = 'Created';

202

readonly 202: "Accepted" = 'Accepted';

203

readonly 203: "Non-Authoritative Information" = 'Non-Authoritative Information';

204

readonly 204: "No Content" = 'No Content';

205

readonly 205: "Reset Content" = 'Reset Content';

206

readonly 206: "Partial Content" = 'Partial Content';

207

readonly 207: "Multi-Status" = 'Multi-Status';

208

readonly 208: "Already Reported" = 'Already Reported';

226

readonly 226: "IM Used" = 'IM Used';

300

readonly 300: "Multiple Choices" = 'Multiple Choices';

301

readonly 301: "Moved Permanently" = 'Moved Permanently';

302

readonly 302: "Found" = 'Found';

303

readonly 303: "See Other" = 'See Other';

304

readonly 304: "Not Modified" = 'Not Modified';

305

readonly 305: "Use Proxy" = 'Use Proxy';

307

readonly 307: "Temporary Redirect" = 'Temporary Redirect';

308

readonly 308: "Permanent Redirect" = 'Permanent Redirect';

400

readonly 400: "Bad Request" = 'Bad Request';

401

readonly 401: "Unauthorized" = 'Unauthorized';

402

readonly 402: "Payment Required" = 'Payment Required';

403

readonly 403: "Forbidden" = 'Forbidden';

404

readonly 404: "Not Found" = 'Not Found';

405

readonly 405: "Method Not Allowed" = 'Method Not Allowed';

406

readonly 406: "Not Acceptable" = 'Not Acceptable';

407

readonly 407: "Proxy Authentication Required" = 'Proxy Authentication Required';

408

readonly 408: "Request Timeout" = 'Request Timeout';

409

readonly 409: "Conflict" = 'Conflict';

410

readonly 410: "Gone" = 'Gone';

411

readonly 411: "Length Required" = 'Length Required';

412

readonly 412: "Precondition Failed" = 'Precondition Failed';

413

readonly 413: "Payload Too Large" = 'Payload Too Large';

414

readonly 414: "URI Too Long" = 'URI Too Long';

415

readonly 415: "Unsupported Media Type" = 'Unsupported Media Type';

416

readonly 416: "Range Not Satisfiable" = 'Range Not Satisfiable';

417

readonly 417: "Expectation Failed" = 'Expectation Failed';

418

readonly 418: "I'm a Teapot" = "I'm a Teapot";

421

readonly 421: "Misdirected Request" = 'Misdirected Request';

422

readonly 422: "Unprocessable Entity" = 'Unprocessable Entity';

423

readonly 423: "Locked" = 'Locked';

424

readonly 424: "Failed Dependency" = 'Failed Dependency';

425

readonly 425: "Too Early" = 'Too Early';

426

readonly 426: "Upgrade Required" = 'Upgrade Required';

428

readonly 428: "Precondition Required" = 'Precondition Required';

429

readonly 429: "Too Many Requests" = 'Too Many Requests';

431

readonly 431: "Request Header Fields Too Large" = 'Request Header Fields Too Large';

451

readonly 451: "Unavailable For Legal Reasons" = 'Unavailable For Legal Reasons';

500

readonly 500: "Internal Server Error" = 'Internal Server Error';

501

readonly 501: "Not Implemented" = 'Not Implemented';

502

readonly 502: "Bad Gateway" = 'Bad Gateway';

503

readonly 503: "Service Unavailable" = 'Service Unavailable';

504

readonly 504: "Gateway Timeout" = 'Gateway Timeout';

505

readonly 505: "HTTP Version Not Supported" = 'HTTP Version Not Supported';

506

readonly 506: "Variant Also Negotiates" = 'Variant Also Negotiates';

507

readonly 507: "Insufficient Storage" = 'Insufficient Storage';

508

readonly 508: "Loop Detected" = 'Loop Detected';

509

readonly 509: "Bandwidth Limit Exceeded" = 'Bandwidth Limit Exceeded';

510

readonly 510: "Not Extended" = 'Not Extended';

511

readonly 511: "Network Authentication Required" = 'Network Authentication Required';