@munlib/common 1.0.116 → 1.0.118

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.
@@ -102,8 +102,8 @@ exports.errorCodes = {
102
102
  "ERROR": "Se produjo un error al realizar la consulta",
103
103
  "TINS": "Tipo de Instalación no coincide con identificador de la deuda",
104
104
  //Errores genrales
105
- 'ECONNABORTED': 'La solicitud ha superado el tiempo de espera. Por favor, inténtelo de nuevo más tarde.',
106
- 'ECONNREFUSED': 'No se pudo conectar al servidor. Por favor, verifique su conexión y vuelva a intentarlo.',
105
+ 'ECONNABORTED': 'La solicitud ha superado el tiempo de espera. Inténtelo de nuevo más tarde.',
106
+ 'ECONNREFUSED': 'No se pudo conectar al servidor. Verifique su conexión y vuelva a intentarlo.',
107
107
  'ENOTFOUND': 'No se pudo encontrar el servidor. Por favor, verifique la URL e inténtelo de nuevo.',
108
108
  'EHOSTUNREACH': 'El servidor está inalcanzable. Verifique su red e intente nuevamente.',
109
109
  '500': 'Hubo un error en el servidor. Inténtelo más tarde.',
@@ -5,6 +5,7 @@ export declare class RequestValidationError extends CustomError {
5
5
  statusCode: number;
6
6
  constructor(errors: ValidationError[]);
7
7
  serializeErrors(): {
8
+ status: string;
8
9
  msg: any;
9
10
  field: string;
10
11
  }[];
@@ -17,6 +17,7 @@ var __extends = (this && this.__extends) || (function () {
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.RequestValidationError = void 0;
19
19
  var custom_error_1 = require("./custom-error");
20
+ var erroresStatus_1 = require("./erroresStatus");
20
21
  var RequestValidationError = /** @class */ (function (_super) {
21
22
  __extends(RequestValidationError, _super);
22
23
  function RequestValidationError(errors) {
@@ -28,8 +29,9 @@ var RequestValidationError = /** @class */ (function (_super) {
28
29
  return _this;
29
30
  }
30
31
  RequestValidationError.prototype.serializeErrors = function () {
32
+ var _this = this;
31
33
  return this.errors.map(function (err) {
32
- return { msg: err.msg, field: err.param };
34
+ return { status: erroresStatus_1.ErrorController.getGeneralStatus(_this.statusCode.toString()), msg: err.msg, field: err.param };
33
35
  });
34
36
  };
35
37
  return RequestValidationError;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@munlib/common",
3
- "version": "1.0.116",
3
+ "version": "1.0.118",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",