all files / lib/ server-errors.js

72.28% Statements 73/101
21.82% Branches 12/55
62.96% Functions 17/27
73.47% Lines 72/98
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      11× 11× 11×                                                                                                      
"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var server_types_1 = require("./server-types");
var BadRequestError = (function (_super) {
    __extends(BadRequestError, _super);
    function BadRequestError(message) {
        var _this = _super.call(this, "BadRequestError", 400, message || "Bad Request") || this;
        Object["setPrototypeOf"](_this, BadRequestError.prototype);
        return _this;
    }
    return BadRequestError;
}(server_types_1.HttpError));
exports.BadRequestError = BadRequestError;
var UnauthorizedError = (function (_super) {
    __extends(UnauthorizedError, _super);
    function UnauthorizedError(message) {
        var _this = _super.call(this, "UnauthorizedError", 401, message || "Unauthorized") || this;
        Object["setPrototypeOf"](_this, UnauthorizedError.prototype);
        return _this;
    }
    return UnauthorizedError;
}(server_types_1.HttpError));
exports.UnauthorizedError = UnauthorizedError;
var ForbidenError = (function (_super) {
    __extends(ForbidenError, _super);
    function ForbidenError(message) {
        var _this = _super.call(this, "ForbidenError", 403, message || "Forbiden") || this;
        Object["setPrototypeOf"](_this, ForbidenError.prototype);
        return _this;
    }
    return ForbidenError;
}(server_types_1.HttpError));
exports.ForbidenError = ForbidenError;
var NotFoundError = (function (_super) {
    __extends(NotFoundError, _super);
    function NotFoundError(message) {
        var _this = _super.call(this, "NotFoundError", 404, message || "Not Found") || this;
        Object["setPrototypeOf"](_this, NotFoundError.prototype);
        return _this;
    }
    return NotFoundError;
}(server_types_1.HttpError));
exports.NotFoundError = NotFoundError;
var MethodNotAllowedError = (function (_super) {
    __extends(MethodNotAllowedError, _super);
    function MethodNotAllowedError(message) {
        var _this = _super.call(this, "MethodNotAllowedError", 405, message || "Method Not Allowed") || this;
        Object["setPrototypeOf"](_this, MethodNotAllowedError.prototype);
        return _this;
    }
    return MethodNotAllowedError;
}(server_types_1.HttpError));
exports.MethodNotAllowedError = MethodNotAllowedError;
var NotAcceptableError = (function (_super) {
    __extends(NotAcceptableError, _super);
    function NotAcceptableError(message) {
        var _this = _super.call(this, "NotAcceptableError", 406, message || "Not Acceptable") || this;
        Object["setPrototypeOf"](_this, NotAcceptableError.prototype);
        return _this;
    }
    return NotAcceptableError;
}(server_types_1.HttpError));
exports.NotAcceptableError = NotAcceptableError;
var ConflictError = (function (_super) {
    __extends(ConflictError, _super);
    function ConflictError(message) {
        var _this = _super.call(this, "ConflictError", 409, message || "Conflict") || this;
        Object["setPrototypeOf"](_this, ConflictError.prototype);
        return _this;
    }
    return ConflictError;
}(server_types_1.HttpError));
exports.ConflictError = ConflictError;
var GoneError = (function (_super) {
    __extends(GoneError, _super);
    function GoneError(message) {
        var _this = _super.call(this, "GoneError", 410, message || "Gone") || this;
        Object["setPrototypeOf"](_this, GoneError.prototype);
        return _this;
    }
    return GoneError;
}(server_types_1.HttpError));
exports.GoneError = GoneError;
var UnsupportedMediaTypeError = (function (_super) {
    __extends(UnsupportedMediaTypeError, _super);
    function UnsupportedMediaTypeError(message) {
        var _this = _super.call(this, "UnsupportedMediaTypeError", 415, message || "Unsupported Media Type") || this;
        Object["setPrototypeOf"](_this, UnsupportedMediaTypeError.prototype);
        return _this;
    }
    return UnsupportedMediaTypeError;
}(server_types_1.HttpError));
exports.UnsupportedMediaTypeError = UnsupportedMediaTypeError;
var InternalServerError = (function (_super) {
    __extends(InternalServerError, _super);
    function InternalServerError(message) {
        var _this = _super.call(this, "InternalServerError", 500, message || "Internal Server Error") || this;
        Object["setPrototypeOf"](_this, InternalServerError.prototype);
        return _this;
    }
    return InternalServerError;
}(server_types_1.HttpError));
exports.InternalServerError = InternalServerError;
var NotImplementedError = (function (_super) {
    __extends(NotImplementedError, _super);
    function NotImplementedError(message) {
        var _this = _super.call(this, "NotImplementedError", 501, message || "Not Implemented") || this;
        Object["setPrototypeOf"](_this, NotImplementedError.prototype);
        return _this;
    }
    return NotImplementedError;
}(server_types_1.HttpError));
exports.NotImplementedError = NotImplementedError;
 
//# sourceMappingURL=server-errors.js.map