@munlib/common 1.0.117 → 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.
@@ -5,7 +5,7 @@ export declare class RequestValidationError extends CustomError {
5
5
  statusCode: number;
6
6
  constructor(errors: ValidationError[]);
7
7
  serializeErrors(): {
8
- status: number;
8
+ status: string;
9
9
  msg: any;
10
10
  field: string;
11
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) {
@@ -30,7 +31,7 @@ var RequestValidationError = /** @class */ (function (_super) {
30
31
  RequestValidationError.prototype.serializeErrors = function () {
31
32
  var _this = this;
32
33
  return this.errors.map(function (err) {
33
- return { status: _this.statusCode, msg: err.msg, field: err.param };
34
+ return { status: erroresStatus_1.ErrorController.getGeneralStatus(_this.statusCode.toString()), msg: err.msg, field: err.param };
34
35
  });
35
36
  };
36
37
  return RequestValidationError;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@munlib/common",
3
- "version": "1.0.117",
3
+ "version": "1.0.118",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",