@munlib/common 1.0.159 → 1.0.160
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26,14 +26,14 @@ var GenericError = /** @class */ (function (_super) {
|
|
|
26
26
|
userMsg // Mensaje amigable para el usuario
|
|
27
27
|
) {
|
|
28
28
|
if (code === void 0) { code = "500"; }
|
|
29
|
-
if (typeError === void 0) { typeError = "
|
|
29
|
+
if (typeError === void 0) { typeError = "MIDDLEWARE"; }
|
|
30
30
|
if (userMsg === void 0) { userMsg = "Hemos encontrado un problema. Inténtelo nuevamente más tarde."; }
|
|
31
31
|
var _this = _super.call(this, msg, typeError, userMsg) || this;
|
|
32
32
|
_this.msg = msg;
|
|
33
33
|
_this.code = code;
|
|
34
34
|
_this.typeError = typeError;
|
|
35
35
|
_this.userMsg = userMsg;
|
|
36
|
-
_this.statusCode =
|
|
36
|
+
_this.statusCode = 500; // Convertir el código a número para HTTP
|
|
37
37
|
_this.msg = erroresStatus_1.ErrorController.getErrorMessage(code) || _this.message;
|
|
38
38
|
Object.setPrototypeOf(_this, GenericError.prototype);
|
|
39
39
|
return _this;
|