UNPKG

error-advisor

Version:

NPM module that aim to facilitate the error handling by providing http errors classes and also let you customize business errors as well with handy and clean way.

16 lines 640 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const StatusCode_1 = require("../../enum/StatusCode"); class PaymentRequied extends Error { constructor(message) { message = message || "Request cannot be fulfilled - Requested content is not available until the client makes a payment."; super(message); this.name = "Payment Required"; this.statusCode = StatusCode_1.StatusCode.PAYMENT_REQUIRED; this.type = this.name; this.timestamp = +new Date(); } } exports.default = PaymentRequied; //# sourceMappingURL=PaymentRequied.js.map