@uxf/cms 11.28.2 → 11.28.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,18 @@
1
1
  import ExtendableError from "es6-error";
2
+ interface Error {
3
+ code: string;
4
+ message: string;
5
+ }
6
+ interface ValidationError {
7
+ field: string;
8
+ message: string;
9
+ }
10
+ interface ErrorData {
11
+ error: Error;
12
+ validationErrors: ValidationError[];
13
+ }
2
14
  export declare class BadRequestError extends ExtendableError {
3
- data: any;
4
- constructor(data: {
5
- message?: string;
6
- shouldTranslate?: boolean;
7
- }, message?: string);
15
+ data: ErrorData;
16
+ constructor(data: ErrorData);
8
17
  }
18
+ export {};
@@ -6,9 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.BadRequestError = void 0;
7
7
  const es6_error_1 = __importDefault(require("es6-error"));
8
8
  class BadRequestError extends es6_error_1.default {
9
- constructor(data, message = "Bad Request") {
10
- var _a;
11
- super((_a = data.message) !== null && _a !== void 0 ? _a : message);
9
+ constructor(data) {
10
+ super(data.error.message);
12
11
  this.data = data;
13
12
  }
14
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/cms",
3
- "version": "11.28.2",
3
+ "version": "11.28.5",
4
4
  "description": "UXF Cms",
5
5
  "author": "UXFans <dev@uxf.cz>",
6
6
  "homepage": "https://gitlab.com/uxf-npm/cms#readme",
@@ -32,11 +32,11 @@
32
32
  "@redux-devtools/extension": "3.3.0",
33
33
  "@uxf/core": "11.22.0",
34
34
  "@uxf/core-react": "11.22.0",
35
- "@uxf/data-grid": "11.28.2",
36
- "@uxf/form": "11.28.2",
35
+ "@uxf/data-grid": "11.28.4",
36
+ "@uxf/form": "11.28.4",
37
37
  "@uxf/router": "11.22.0",
38
- "@uxf/ui": "11.28.2",
39
- "@uxf/wysiwyg": "11.28.2",
38
+ "@uxf/ui": "11.28.4",
39
+ "@uxf/wysiwyg": "11.28.4",
40
40
  "axios": "1.6.7",
41
41
  "axios-hooks": "5.0.2",
42
42
  "es6-error": "4.1.1",