UNPKG

caprover-lib

Version:

A library to communicate with CapRover instances

53 lines (34 loc) 1.37 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } class ErrorFactory { constructor() { _defineProperty(this, "OKAY", 100); _defineProperty(this, "OKAY_BUILD_STARTED", 101); _defineProperty(this, "STATUS_ERROR_GENERIC", 1000); _defineProperty(this, "STATUS_ERROR_CAPTAIN_NOT_INITIALIZED", 1001); _defineProperty(this, "STATUS_ERROR_USER_NOT_INITIALIZED", 1101); _defineProperty(this, "STATUS_ERROR_NOT_AUTHORIZED", 1102); _defineProperty(this, "STATUS_ERROR_ALREADY_EXIST", 1103); _defineProperty(this, "STATUS_ERROR_BAD_NAME", 1104); _defineProperty(this, "STATUS_WRONG_PASSWORD", 1105); _defineProperty(this, "STATUS_AUTH_TOKEN_INVALID", 1106); _defineProperty(this, "VERIFICATION_FAILED", 1107); _defineProperty(this, "UNKNOWN_ERROR", 1999); } createError(status, message) { const e = new Error(message); e.captainStatus = status; e.captainMessage = message; return e; } eatUpPromiseRejection() { return function (error) {// nom nom }; } } var _default = new ErrorFactory(); exports.default = _default;