@munlib/common 1.0.181 → 1.0.182

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.
@@ -36,6 +36,7 @@ var RequestValidationError = /** @class */ (function (_super) {
36
36
  return _this;
37
37
  }
38
38
  RequestValidationError.prototype.serializeErrors = function () {
39
+ console.log("******1111********", this.errors[0]);
39
40
  return {
40
41
  status: erroresStatus_1.ErrorController.getGeneralStatus(this.statusCode.toString()),
41
42
  msg: this.errors[0].msg,
@@ -8,7 +8,7 @@ var validateRequest = function (req, res, next) {
8
8
  if (!errors.isEmpty()) {
9
9
  // Extraer el primer error y sus detalles personalizados (typeError y userMsg)
10
10
  var firstError = errors.array()[0]; // Primer error encontrado
11
- var typeError = firstError.msg.typeError || "VALIDATION_ERROR";
11
+ var typeError = firstError.msg.typeMsg || "SINTAX";
12
12
  var userMsg = firstError.msg.userMsg || "Error de validación en la solicitud";
13
13
  // Lanzar RequestValidationError con los campos personalizados
14
14
  throw new request_validation_error_1.RequestValidationError(errors.array(), userMsg, typeError);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@munlib/common",
3
- "version": "1.0.181",
3
+ "version": "1.0.182",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",