@libj/http-meta
Version:
179 lines • 8.99 kB
JavaScript
/* eslint-disable max-classes-per-file */
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.GatewayTimeoutHttpError = exports.ServiceUnavailableHttpError = exports.BadGatewayHttpError = exports.NotImplementedHttpError = exports.InternalServerHttpError = exports.PreconditionFailedHttpError = exports.ConflictHttpError = exports.NotAcceptableHttpError = exports.MethodNotAllowedHttpError = exports.NotFoundHttpError = exports.ForbiddenHttpError = exports.UnauthorizedHttpError = exports.BadRequestHttpError = exports.HttpError = void 0;
var HttpError_1 = require("./HttpError");
Object.defineProperty(exports, "HttpError", { enumerable: true, get: function () { return HttpError_1.HttpError; } });
var HttpStatus_1 = require("../status/HttpStatus");
var BadRequestHttpError = /** @class */ (function (_super) {
__extends(BadRequestHttpError, _super);
function BadRequestHttpError(options) {
if (options === void 0) { options = {}; }
var _this = _super.call(this, HttpStatus_1.HttpStatus.BAD_REQUEST, options) || this;
Object.setPrototypeOf(_this, BadRequestHttpError.prototype);
_this.name = BadRequestHttpError.name;
return _this;
}
return BadRequestHttpError;
}(HttpError_1.HttpError));
exports.BadRequestHttpError = BadRequestHttpError;
var UnauthorizedHttpError = /** @class */ (function (_super) {
__extends(UnauthorizedHttpError, _super);
function UnauthorizedHttpError(options) {
if (options === void 0) { options = {}; }
var _this = _super.call(this, HttpStatus_1.HttpStatus.UNAUTHORIZED, options) || this;
Object.setPrototypeOf(_this, UnauthorizedHttpError.prototype);
_this.name = UnauthorizedHttpError.name;
return _this;
}
return UnauthorizedHttpError;
}(HttpError_1.HttpError));
exports.UnauthorizedHttpError = UnauthorizedHttpError;
var ForbiddenHttpError = /** @class */ (function (_super) {
__extends(ForbiddenHttpError, _super);
function ForbiddenHttpError(options) {
if (options === void 0) { options = {}; }
var _this = _super.call(this, HttpStatus_1.HttpStatus.FORBIDDEN, options) || this;
Object.setPrototypeOf(_this, ForbiddenHttpError.prototype);
_this.name = ForbiddenHttpError.name;
return _this;
}
return ForbiddenHttpError;
}(HttpError_1.HttpError));
exports.ForbiddenHttpError = ForbiddenHttpError;
var NotFoundHttpError = /** @class */ (function (_super) {
__extends(NotFoundHttpError, _super);
function NotFoundHttpError(options) {
if (options === void 0) { options = {}; }
var _this = _super.call(this, HttpStatus_1.HttpStatus.NOT_FOUND, options) || this;
Object.setPrototypeOf(_this, NotFoundHttpError.prototype);
_this.name = NotFoundHttpError.name;
return _this;
}
return NotFoundHttpError;
}(HttpError_1.HttpError));
exports.NotFoundHttpError = NotFoundHttpError;
var MethodNotAllowedHttpError = /** @class */ (function (_super) {
__extends(MethodNotAllowedHttpError, _super);
function MethodNotAllowedHttpError(options) {
if (options === void 0) { options = {}; }
var _this = _super.call(this, HttpStatus_1.HttpStatus.METHOD_NOT_ALLOWED, options) || this;
Object.setPrototypeOf(_this, MethodNotAllowedHttpError.prototype);
_this.name = MethodNotAllowedHttpError.name;
return _this;
}
return MethodNotAllowedHttpError;
}(HttpError_1.HttpError));
exports.MethodNotAllowedHttpError = MethodNotAllowedHttpError;
var NotAcceptableHttpError = /** @class */ (function (_super) {
__extends(NotAcceptableHttpError, _super);
function NotAcceptableHttpError(options) {
if (options === void 0) { options = {}; }
var _this = _super.call(this, HttpStatus_1.HttpStatus.NOT_ACCEPTABLE, options) || this;
Object.setPrototypeOf(_this, NotAcceptableHttpError.prototype);
_this.name = NotAcceptableHttpError.name;
return _this;
}
return NotAcceptableHttpError;
}(HttpError_1.HttpError));
exports.NotAcceptableHttpError = NotAcceptableHttpError;
var ConflictHttpError = /** @class */ (function (_super) {
__extends(ConflictHttpError, _super);
function ConflictHttpError(options) {
if (options === void 0) { options = {}; }
var _this = _super.call(this, HttpStatus_1.HttpStatus.CONFLICT, options) || this;
Object.setPrototypeOf(_this, ConflictHttpError.prototype);
_this.name = ConflictHttpError.name;
return _this;
}
return ConflictHttpError;
}(HttpError_1.HttpError));
exports.ConflictHttpError = ConflictHttpError;
var PreconditionFailedHttpError = /** @class */ (function (_super) {
__extends(PreconditionFailedHttpError, _super);
function PreconditionFailedHttpError(options) {
if (options === void 0) { options = {}; }
var _this = _super.call(this, HttpStatus_1.HttpStatus.PRECONDITION_FAILED, options) || this;
Object.setPrototypeOf(_this, PreconditionFailedHttpError.prototype);
_this.name = PreconditionFailedHttpError.name;
return _this;
}
return PreconditionFailedHttpError;
}(HttpError_1.HttpError));
exports.PreconditionFailedHttpError = PreconditionFailedHttpError;
var InternalServerHttpError = /** @class */ (function (_super) {
__extends(InternalServerHttpError, _super);
function InternalServerHttpError(options) {
if (options === void 0) { options = {}; }
var _this = _super.call(this, HttpStatus_1.HttpStatus.INTERNAL_SERVER_ERROR, options) || this;
Object.setPrototypeOf(_this, InternalServerHttpError.prototype);
_this.name = InternalServerHttpError.name;
return _this;
}
return InternalServerHttpError;
}(HttpError_1.HttpError));
exports.InternalServerHttpError = InternalServerHttpError;
var NotImplementedHttpError = /** @class */ (function (_super) {
__extends(NotImplementedHttpError, _super);
function NotImplementedHttpError(options) {
if (options === void 0) { options = {}; }
var _this = _super.call(this, HttpStatus_1.HttpStatus.NOT_IMPLEMENTED, options) || this;
Object.setPrototypeOf(_this, NotImplementedHttpError.prototype);
_this.name = NotImplementedHttpError.name;
return _this;
}
return NotImplementedHttpError;
}(HttpError_1.HttpError));
exports.NotImplementedHttpError = NotImplementedHttpError;
var BadGatewayHttpError = /** @class */ (function (_super) {
__extends(BadGatewayHttpError, _super);
function BadGatewayHttpError(options) {
if (options === void 0) { options = {}; }
var _this = _super.call(this, HttpStatus_1.HttpStatus.BAD_GATEWAY, options) || this;
Object.setPrototypeOf(_this, BadGatewayHttpError.prototype);
_this.name = BadGatewayHttpError.name;
return _this;
}
return BadGatewayHttpError;
}(HttpError_1.HttpError));
exports.BadGatewayHttpError = BadGatewayHttpError;
var ServiceUnavailableHttpError = /** @class */ (function (_super) {
__extends(ServiceUnavailableHttpError, _super);
function ServiceUnavailableHttpError(options) {
if (options === void 0) { options = {}; }
var _this = _super.call(this, HttpStatus_1.HttpStatus.SERVICE_UNAVAILABLE, options) || this;
Object.setPrototypeOf(_this, ServiceUnavailableHttpError.prototype);
_this.name = ServiceUnavailableHttpError.name;
return _this;
}
return ServiceUnavailableHttpError;
}(HttpError_1.HttpError));
exports.ServiceUnavailableHttpError = ServiceUnavailableHttpError;
var GatewayTimeoutHttpError = /** @class */ (function (_super) {
__extends(GatewayTimeoutHttpError, _super);
function GatewayTimeoutHttpError(options) {
if (options === void 0) { options = {}; }
var _this = _super.call(this, HttpStatus_1.HttpStatus.GATEWAY_TIMEOUT, options) || this;
Object.setPrototypeOf(_this, GatewayTimeoutHttpError.prototype);
_this.name = GatewayTimeoutHttpError.name;
return _this;
}
return GatewayTimeoutHttpError;
}(HttpError_1.HttpError));
exports.GatewayTimeoutHttpError = GatewayTimeoutHttpError;
//# sourceMappingURL=index.js.map
;