@uxf/cms 11.28.4 → 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:
|
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
|
10
|
-
|
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
|
}
|