@speedup/error
Version:
SpeedUP standard error library
36 lines (35 loc) • 1.35 kB
JavaScript
;
/**
* HTTP Bad request
*/
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 (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
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 http_error_1 = require("./http_error");
var HttpBadRequest = /** @class */ (function (_super) {
__extends(HttpBadRequest, _super);
function HttpBadRequest(config) {
var _this =
// parent class constructor
_super.call(this, config) || this;
_this.validationErrors = config.validationErrors;
// set stacktrace
Error.captureStackTrace(_this, HttpBadRequest);
// Set prototype to make instanceOf enabled
Object.setPrototypeOf(_this, HttpBadRequest.prototype);
return _this;
}
return HttpBadRequest;
}(http_error_1.HttpError));
exports.HttpBadRequest = HttpBadRequest;