UNPKG

cloudstudio

Version:

Run VS Code on a remote server.

31 lines 1.19 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CookieKeys = exports.HttpError = exports.HttpCode = void 0; var HttpCode; (function (HttpCode) { HttpCode[HttpCode["Ok"] = 200] = "Ok"; HttpCode[HttpCode["Redirect"] = 302] = "Redirect"; HttpCode[HttpCode["NotFound"] = 404] = "NotFound"; HttpCode[HttpCode["BadRequest"] = 400] = "BadRequest"; HttpCode[HttpCode["Unauthorized"] = 401] = "Unauthorized"; HttpCode[HttpCode["LargePayload"] = 413] = "LargePayload"; HttpCode[HttpCode["ServerError"] = 500] = "ServerError"; })(HttpCode = exports.HttpCode || (exports.HttpCode = {})); /** * Represents an error with a message and an HTTP status code. This code will be * used in the HTTP response. */ class HttpError extends Error { constructor(message, statusCode, details) { super(message); this.statusCode = statusCode; this.details = details; this.name = this.constructor.name; } } exports.HttpError = HttpError; var CookieKeys; (function (CookieKeys) { CookieKeys["Session"] = "key"; })(CookieKeys = exports.CookieKeys || (exports.CookieKeys = {})); //# sourceMappingURL=http.js.map