@smartsheet-extensions/handler 1.1.3 → 1.1.5
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.
- package/__tests__/errorHandling.spec.ts +18 -0
- package/lib/errors/AbstractError.js +4 -4
- package/lib/errors/AbstractError.js.map +1 -1
- package/lib/errors/BadRequestError.d.ts +2 -1
- package/lib/errors/BadRequestError.d.ts.map +1 -1
- package/lib/errors/BadRequestError.js +2 -1
- package/lib/errors/BadRequestError.js.map +1 -1
- package/lib/errors/ExtensionError.d.ts +1 -1
- package/lib/errors/ExtensionError.d.ts.map +1 -1
- package/lib/errors/ExtensionError.js +15 -2
- package/lib/errors/ExtensionError.js.map +1 -1
- package/lib/errors/InternalError.d.ts +2 -1
- package/lib/errors/InternalError.d.ts.map +1 -1
- package/lib/errors/InternalError.js +2 -1
- package/lib/errors/InternalError.js.map +1 -1
- package/lib/errors/NotFoundError.d.ts +2 -1
- package/lib/errors/NotFoundError.d.ts.map +1 -1
- package/lib/errors/NotFoundError.js +2 -1
- package/lib/errors/NotFoundError.js.map +1 -1
- package/lib/errors/PayloadFetchError.d.ts +2 -1
- package/lib/errors/PayloadFetchError.d.ts.map +1 -1
- package/lib/errors/PayloadFetchError.js +2 -2
- package/lib/errors/PayloadFetchError.js.map +1 -1
- package/lib/errors/PayloadLimitExceedError.d.ts +2 -1
- package/lib/errors/PayloadLimitExceedError.d.ts.map +1 -1
- package/lib/errors/PayloadLimitExceedError.js +2 -1
- package/lib/errors/PayloadLimitExceedError.js.map +1 -1
- package/lib/errors/PayloadPostError.d.ts +2 -1
- package/lib/errors/PayloadPostError.d.ts.map +1 -1
- package/lib/errors/PayloadPostError.js +2 -2
- package/lib/errors/PayloadPostError.js.map +1 -1
- package/lib/errors/PlatformError.js +4 -4
- package/lib/errors/PlatformError.js.map +1 -1
- package/lib/errors/StandardError.d.ts +1 -0
- package/lib/errors/StandardError.d.ts.map +1 -1
- package/lib/errors/StandardError.js +1 -0
- package/lib/errors/StandardError.js.map +1 -1
- package/lib/errors/UncaughtError.d.ts +2 -1
- package/lib/errors/UncaughtError.d.ts.map +1 -1
- package/lib/errors/UncaughtError.js +2 -1
- package/lib/errors/UncaughtError.js.map +1 -1
- package/package.json +1 -1
|
@@ -76,6 +76,15 @@ describe('integration tests - error handling', () => {
|
|
|
76
76
|
code: ExtensionError.CODE,
|
|
77
77
|
description: 'some error',
|
|
78
78
|
httpStatus: 500,
|
|
79
|
+
standardError: {
|
|
80
|
+
details: {
|
|
81
|
+
errorCode: ExtensionError.CODE,
|
|
82
|
+
logMessage: 'some error',
|
|
83
|
+
service: 'Extension',
|
|
84
|
+
},
|
|
85
|
+
retryable: false,
|
|
86
|
+
type: 3,
|
|
87
|
+
},
|
|
79
88
|
},
|
|
80
89
|
});
|
|
81
90
|
}
|
|
@@ -134,6 +143,15 @@ describe('integration tests - error handling', () => {
|
|
|
134
143
|
code: ExtensionError.CODE,
|
|
135
144
|
description: 'some error',
|
|
136
145
|
httpStatus: 500,
|
|
146
|
+
standardError: {
|
|
147
|
+
details: {
|
|
148
|
+
errorCode: ExtensionError.CODE,
|
|
149
|
+
logMessage: 'some error',
|
|
150
|
+
service: 'Extension',
|
|
151
|
+
},
|
|
152
|
+
retryable: false,
|
|
153
|
+
type: 3,
|
|
154
|
+
},
|
|
137
155
|
},
|
|
138
156
|
});
|
|
139
157
|
}
|
|
@@ -24,12 +24,12 @@ class AbstractError extends Error {
|
|
|
24
24
|
enumerable: false,
|
|
25
25
|
writable: false,
|
|
26
26
|
value: {
|
|
27
|
-
type: standardError.type,
|
|
28
|
-
retryable: standardError.retryable,
|
|
27
|
+
type: standardError.type || 'unknown',
|
|
28
|
+
retryable: standardError.retryable || false,
|
|
29
29
|
details: {
|
|
30
30
|
service: standardError.details.service || 'unknown',
|
|
31
|
-
errorCode: standardError.details.errorCode ||
|
|
32
|
-
logMessage: standardError.details.logMessage ||
|
|
31
|
+
errorCode: standardError.details.errorCode || code,
|
|
32
|
+
logMessage: standardError.details.logMessage || description,
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
35
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractError.js","sourceRoot":"","sources":["../../src/errors/AbstractError.ts"],"names":[],"mappings":";;;AACA,sEAAiE;AAGjE,MAAsB,aAAc,SAAQ,KAAK;IAI/C,YAAmB,EACjB,IAAI,EACJ,WAAW,EACX,UAAU,EACV,aAAa,GACU;QACvB,KAAK,CAAC,WAAW,CAAC,CAAC;QACnB,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAChD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;YAClC,YAAY,EAAE,KAAK;YACnB,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;YACf,KAAK,EAAE,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI;SACrC,CAAC,CAAC;QACH,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE;YACxC,YAAY,EAAE,KAAK;YACnB,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;YACf,KAAK,EAAE,UAAU;SAClB,CAAC,CAAC;QACH,IAAI,aAAa,EAAE;YACjB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,eAAe,EAAE;gBAC3C,YAAY,EAAE,KAAK;gBACnB,UAAU,EAAE,KAAK;gBACjB,QAAQ,EAAE,KAAK;gBACf,KAAK,EAAE;oBACL,IAAI,EAAE,aAAa,CAAC,IAAI;
|
|
1
|
+
{"version":3,"file":"AbstractError.js","sourceRoot":"","sources":["../../src/errors/AbstractError.ts"],"names":[],"mappings":";;;AACA,sEAAiE;AAGjE,MAAsB,aAAc,SAAQ,KAAK;IAI/C,YAAmB,EACjB,IAAI,EACJ,WAAW,EACX,UAAU,EACV,aAAa,GACU;QACvB,KAAK,CAAC,WAAW,CAAC,CAAC;QACnB,KAAK,CAAC,iB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 -1,7 +1,8 @@
|
|
|
1
1
|
import { AbstractError } from './AbstractError';
|
|
2
|
+
import { StandardError } from './StandardError';
|
|
2
3
|
export declare class BadRequestError extends AbstractError {
|
|
3
4
|
static CODE: string;
|
|
4
5
|
static STATUS: number;
|
|
5
|
-
constructor(description: string);
|
|
6
|
+
constructor(description: string, standardError?: StandardError);
|
|
6
7
|
}
|
|
7
8
|
//# sourceMappingURL=BadRequestError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadRequestError.d.ts","sourceRoot":"","sources":["../../src/errors/BadRequestError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,eAAgB,SAAQ,aAAa;IAChD,OAAc,IAAI,SAAiB;IACnC,OAAc,MAAM,SAAO;gBACR,WAAW,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"BadRequestError.d.ts","sourceRoot":"","sources":["../../src/errors/BadRequestError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,eAAgB,SAAQ,aAAa;IAChD,OAAc,IAAI,SAAiB;IACnC,OAAc,MAAM,SAAO;gBACR,WAAW,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,aAAa;CAQtE"}
|
|
@@ -3,11 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BadRequestError = void 0;
|
|
4
4
|
const AbstractError_1 = require("./AbstractError");
|
|
5
5
|
class BadRequestError extends AbstractError_1.AbstractError {
|
|
6
|
-
constructor(description) {
|
|
6
|
+
constructor(description, standardError) {
|
|
7
7
|
super({
|
|
8
8
|
code: BadRequestError.CODE,
|
|
9
9
|
httpStatus: BadRequestError.STATUS,
|
|
10
10
|
description,
|
|
11
|
+
standardError,
|
|
11
12
|
});
|
|
12
13
|
}
|
|
13
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadRequestError.js","sourceRoot":"","sources":["../../src/errors/BadRequestError.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;
|
|
1
|
+
{"version":3,"file":"BadRequestError.js","sourceRoot":"","sources":["../../src/errors/BadRequestError.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAGhD,MAAa,eAAgB,SAAQ,6BAAa;IAGhD,YAAmB,WAAmB,EAAE,aAA6B;QACnE,KAAK,CAAC;YACJ,IAAI,EAAE,eAAe,CAAC,IAAI;YAC1B,UAAU,EAAE,eAAe,CAAC,MAAM;YAClC,WAAW;YACX,aAAa;SACd,CAAC,CAAC;IACL,CAAC;;AAVH,0CAWC;AAVe,oBAAI,GAAG,aAAa,CAAC;AACrB,sBAAM,GAAG,GAAG,CAAC"}
|
|
@@ -3,6 +3,6 @@ import { AbstractError } from './AbstractError';
|
|
|
3
3
|
export declare class ExtensionError extends AbstractError {
|
|
4
4
|
static CODE: string;
|
|
5
5
|
static wrap(e: Error): ExtensionError;
|
|
6
|
-
constructor({ description, httpStatus, code, }: Partial<Omit<ErrorResponse['error'], 'description'>> & Pick<ErrorResponse['error'], 'description'>);
|
|
6
|
+
constructor({ description, httpStatus, code, standardError, }: Partial<Omit<ErrorResponse['error'], 'description'>> & Pick<ErrorResponse['error'], 'description'>);
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=ExtensionError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtensionError.d.ts","sourceRoot":"","sources":["../../src/errors/ExtensionError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ExtensionError.d.ts","sourceRoot":"","sources":["../../src/errors/ExtensionError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD,qBAAa,cAAe,SAAQ,aAAa;IAC/C,OAAc,IAAI,SAAqB;WAEzB,IAAI,CAAC,CAAC,EAAE,KAAK,GAAG,cAAc;gBAoBzB,EACjB,WAAW,EACX,UAAiC,EACjC,IAA0B,EAC1B,aAAa,GACd,EAAE,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,CAAC,GACrD,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC;CAQ9C"}
|
|
@@ -3,16 +3,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ExtensionError = void 0;
|
|
4
4
|
const AbstractError_1 = require("./AbstractError");
|
|
5
5
|
const InternalError_1 = require("./InternalError");
|
|
6
|
+
const StandardError_1 = require("./StandardError");
|
|
6
7
|
class ExtensionError extends AbstractError_1.AbstractError {
|
|
7
|
-
constructor({ description, httpStatus = InternalError_1.InternalError.STATUS, code = ExtensionError.CODE, }) {
|
|
8
|
+
constructor({ description, httpStatus = InternalError_1.InternalError.STATUS, code = ExtensionError.CODE, standardError, }) {
|
|
8
9
|
super({
|
|
9
10
|
code,
|
|
10
11
|
httpStatus,
|
|
11
12
|
description,
|
|
13
|
+
standardError,
|
|
12
14
|
});
|
|
13
15
|
}
|
|
14
16
|
static wrap(e) {
|
|
15
|
-
const error = new ExtensionError({
|
|
17
|
+
const error = new ExtensionError({
|
|
18
|
+
description: e.message,
|
|
19
|
+
standardError: {
|
|
20
|
+
type: StandardError_1.ErrorType.USER,
|
|
21
|
+
retryable: false,
|
|
22
|
+
details: {
|
|
23
|
+
service: 'Extension',
|
|
24
|
+
errorCode: ExtensionError.CODE,
|
|
25
|
+
logMessage: e.message,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
});
|
|
16
29
|
error.stack = `${error.stack
|
|
17
30
|
.split('\n')
|
|
18
31
|
.slice(0, 1)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtensionError.js","sourceRoot":"","sources":["../../src/errors/ExtensionError.ts"],"names":[],"mappings":";;;AACA,mDAAgD;AAChD,mDAAgD;
|
|
1
|
+
{"version":3,"file":"ExtensionError.js","sourceRoot":"","sources":["../../src/errors/ExtensionError.ts"],"names":[],"mappings":";;;AACA,mDAAgD;AAChD,mDAAgD;AAChD,mDAA4C;AAE5C,MAAa,cAAe,SAAQ,6BAAa;IAuB/C,YAAmB,EACjB,WAAW,EACX,UAAU,GAAG,6BAAa,CAAC,MAAM,EACjC,IAAI,GAAG,cAAc,CAAC,IAAI,EAC1B,aAAa,GAE8B;QAC3C,KAAK,CAAC;YACJ,IAAI;YACJ,UAAU;YACV,WAAW;YACX,aAAa;SACd,CAAC,CAAC;IACL,CAAC;IAjCM,MAAM,CAAC,IAAI,CAAC,CAAQ;QACzB,MAAM,KAAK,GAAG,IAAI,cAAc,CAAC;YAC/B,WAAW,EAAE,CAAC,CAAC,OAAO;YACtB,aAAa,EAAE;gBACb,IAAI,EAAE,yBAAS,CAAC,IAAI;gBACpB,SAAS,EAAE,KAAK;gBAChB,OAAO,EAAE;oBACP,OAAO,EAAE,WAAW;oBACpB,SAAS,EAAE,cAAc,CAAC,IAAI;oBAC9B,UAAU,EAAE,CAAC,CAAC,OAAO;iBACtB;aACF;SACF,CAAC,CAAC;QACH,KAAK,CAAC,KAAK,GAAG,GAAG,KAAK,CAAC,KAAK;aACzB,KAAK,CAAC,IAAI,CAAC;aACX,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;aACX,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC5D,OAAO,KAAK,CAAC;IACf,CAAC;;AArBH,wCAqCC;AApCe,mBAAI,GAAG,iBAAiB,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AbstractError } from './AbstractError';
|
|
2
|
+
import { StandardError } from './StandardError';
|
|
2
3
|
export declare class InternalError extends AbstractError {
|
|
3
4
|
static CODE: string;
|
|
4
5
|
static STATUS: number;
|
|
5
|
-
constructor(description: string);
|
|
6
|
+
constructor(description: string, standardError?: StandardError);
|
|
6
7
|
}
|
|
7
8
|
//# sourceMappingURL=InternalError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalError.d.ts","sourceRoot":"","sources":["../../src/errors/InternalError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,aAAc,SAAQ,aAAa;IAC9C,OAAc,IAAI,SAAoB;IACtC,OAAc,MAAM,SAAO;gBACR,WAAW,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"InternalError.d.ts","sourceRoot":"","sources":["../../src/errors/InternalError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,aAAc,SAAQ,aAAa;IAC9C,OAAc,IAAI,SAAoB;IACtC,OAAc,MAAM,SAAO;gBACR,WAAW,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,aAAa;CAQtE"}
|
|
@@ -3,11 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.InternalError = void 0;
|
|
4
4
|
const AbstractError_1 = require("./AbstractError");
|
|
5
5
|
class InternalError extends AbstractError_1.AbstractError {
|
|
6
|
-
constructor(description) {
|
|
6
|
+
constructor(description, standardError) {
|
|
7
7
|
super({
|
|
8
8
|
code: InternalError.CODE,
|
|
9
9
|
httpStatus: InternalError.STATUS,
|
|
10
10
|
description,
|
|
11
|
+
standardError,
|
|
11
12
|
});
|
|
12
13
|
}
|
|
13
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalError.js","sourceRoot":"","sources":["../../src/errors/InternalError.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;
|
|
1
|
+
{"version":3,"file":"InternalError.js","sourceRoot":"","sources":["../../src/errors/InternalError.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAGhD,MAAa,aAAc,SAAQ,6BAAa;IAG9C,YAAmB,WAAmB,EAAE,aAA6B;QACnE,KAAK,CAAC;YACJ,IAAI,EAAE,aAAa,CAAC,IAAI;YACxB,UAAU,EAAE,aAAa,CAAC,MAAM;YAChC,WAAW;YACX,aAAa;SACd,CAAC,CAAC;IACL,CAAC;;AAVH,sCAWC;AAVe,kBAAI,GAAG,gBAAgB,CAAC;AACxB,oBAAM,GAAG,GAAG,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AbstractError } from './AbstractError';
|
|
2
|
+
import { StandardError } from './StandardError';
|
|
2
3
|
export declare class NotFoundError extends AbstractError {
|
|
3
4
|
static CODE: string;
|
|
4
5
|
static STATUS: number;
|
|
5
|
-
constructor(description: string);
|
|
6
|
+
constructor(description: string, standardError?: StandardError);
|
|
6
7
|
}
|
|
7
8
|
//# sourceMappingURL=NotFoundError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotFoundError.d.ts","sourceRoot":"","sources":["../../src/errors/NotFoundError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,aAAc,SAAQ,aAAa;IAC9C,OAAc,IAAI,SAAe;IACjC,OAAc,MAAM,SAAO;gBACR,WAAW,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"NotFoundError.d.ts","sourceRoot":"","sources":["../../src/errors/NotFoundError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,aAAc,SAAQ,aAAa;IAC9C,OAAc,IAAI,SAAe;IACjC,OAAc,MAAM,SAAO;gBACR,WAAW,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,aAAa;CAQtE"}
|
|
@@ -3,11 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NotFoundError = void 0;
|
|
4
4
|
const AbstractError_1 = require("./AbstractError");
|
|
5
5
|
class NotFoundError extends AbstractError_1.AbstractError {
|
|
6
|
-
constructor(description) {
|
|
6
|
+
constructor(description, standardError) {
|
|
7
7
|
super({
|
|
8
8
|
code: NotFoundError.CODE,
|
|
9
9
|
httpStatus: NotFoundError.STATUS,
|
|
10
10
|
description,
|
|
11
|
+
standardError,
|
|
11
12
|
});
|
|
12
13
|
}
|
|
13
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotFoundError.js","sourceRoot":"","sources":["../../src/errors/NotFoundError.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;
|
|
1
|
+
{"version":3,"file":"NotFoundError.js","sourceRoot":"","sources":["../../src/errors/NotFoundError.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAGhD,MAAa,aAAc,SAAQ,6BAAa;IAG9C,YAAmB,WAAmB,EAAE,aAA6B;QACnE,KAAK,CAAC;YACJ,IAAI,EAAE,aAAa,CAAC,IAAI;YACxB,UAAU,EAAE,aAAa,CAAC,MAAM;YAChC,WAAW;YACX,aAAa;SACd,CAAC,CAAC;IACL,CAAC;;AAVH,sCAWC;AAVe,kBAAI,GAAG,WAAW,CAAC;AACnB,oBAAM,GAAG,GAAG,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { PlatformError } from './PlatformError';
|
|
2
|
+
import { StandardError } from './StandardError';
|
|
2
3
|
export declare class PayloadFetchError extends PlatformError {
|
|
3
4
|
static CODE: string;
|
|
4
5
|
static message: string;
|
|
5
|
-
constructor(stacktrace?: any);
|
|
6
|
+
constructor(stacktrace?: any, standardError?: StandardError);
|
|
6
7
|
}
|
|
7
8
|
//# sourceMappingURL=PayloadFetchError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayloadFetchError.d.ts","sourceRoot":"","sources":["../../src/errors/PayloadFetchError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,iBAAkB,SAAQ,aAAa;IAClD,OAAc,IAAI,SAAyB;IAC3C,OAAc,OAAO,SACoC;gBACtC,UAAU,CAAC,EAAE,GAAG;
|
|
1
|
+
{"version":3,"file":"PayloadFetchError.d.ts","sourceRoot":"","sources":["../../src/errors/PayloadFetchError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,iBAAkB,SAAQ,aAAa;IAClD,OAAc,IAAI,SAAyB;IAC3C,OAAc,OAAO,SACoC;gBACtC,UAAU,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,EAAE,aAAa;CAQnE"}
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PayloadFetchError = void 0;
|
|
4
4
|
const PlatformError_1 = require("./PlatformError");
|
|
5
5
|
class PayloadFetchError extends PlatformError_1.PlatformError {
|
|
6
|
-
constructor(stacktrace) {
|
|
7
|
-
super(PayloadFetchError.message, stacktrace, PayloadFetchError.CODE);
|
|
6
|
+
constructor(stacktrace, standardError) {
|
|
7
|
+
super(PayloadFetchError.message, stacktrace, PayloadFetchError.CODE, standardError);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
exports.PayloadFetchError = PayloadFetchError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayloadFetchError.js","sourceRoot":"","sources":["../../src/errors/PayloadFetchError.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;
|
|
1
|
+
{"version":3,"file":"PayloadFetchError.js","sourceRoot":"","sources":["../../src/errors/PayloadFetchError.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAGhD,MAAa,iBAAkB,SAAQ,6BAAa;IAIlD,YAAmB,UAAgB,EAAE,aAA6B;QAChE,KAAK,CACH,iBAAiB,CAAC,OAAO,EACzB,UAAU,EACV,iBAAiB,CAAC,IAAI,EACtB,aAAa,CACd,CAAC;IACJ,CAAC;;AAXH,8CAYC;AAXe,sBAAI,GAAG,qBAAqB,CAAC;AAC7B,yBAAO,GACnB,sDAAsD,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { AbstractError } from './AbstractError';
|
|
2
|
+
import { StandardError } from './StandardError';
|
|
2
3
|
export declare class PayloadLimitExceedError extends AbstractError {
|
|
3
4
|
static CODE: string;
|
|
4
5
|
static STATUS: number;
|
|
5
6
|
static DESCRIPTION: string;
|
|
6
|
-
constructor();
|
|
7
|
+
constructor(standardError?: StandardError);
|
|
7
8
|
}
|
|
8
9
|
//# sourceMappingURL=PayloadLimitExceedError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayloadLimitExceedError.d.ts","sourceRoot":"","sources":["../../src/errors/PayloadLimitExceedError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"PayloadLimitExceedError.d.ts","sourceRoot":"","sources":["../../src/errors/PayloadLimitExceedError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,uBAAwB,SAAQ,aAAa;IACxD,OAAc,IAAI,SAAgC;IAClD,OAAc,MAAM,SAAO;IAC3B,OAAc,WAAW,SACiC;gBACvC,aAAa,CAAC,EAAE,aAAa;CAQjD"}
|
|
@@ -4,11 +4,12 @@ exports.PayloadLimitExceedError = void 0;
|
|
|
4
4
|
const AbstractError_1 = require("./AbstractError");
|
|
5
5
|
const InternalError_1 = require("./InternalError");
|
|
6
6
|
class PayloadLimitExceedError extends AbstractError_1.AbstractError {
|
|
7
|
-
constructor() {
|
|
7
|
+
constructor(standardError) {
|
|
8
8
|
super({
|
|
9
9
|
httpStatus: InternalError_1.InternalError.STATUS,
|
|
10
10
|
code: PayloadLimitExceedError.CODE,
|
|
11
11
|
description: PayloadLimitExceedError.DESCRIPTION,
|
|
12
|
+
standardError,
|
|
12
13
|
});
|
|
13
14
|
}
|
|
14
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayloadLimitExceedError.js","sourceRoot":"","sources":["../../src/errors/PayloadLimitExceedError.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAChD,mDAAgD;
|
|
1
|
+
{"version":3,"file":"PayloadLimitExceedError.js","sourceRoot":"","sources":["../../src/errors/PayloadLimitExceedError.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAChD,mDAAgD;AAGhD,MAAa,uBAAwB,SAAQ,6BAAa;IAKxD,YAAmB,aAA6B;QAC9C,KAAK,CAAC;YACJ,UAAU,EAAE,6BAAa,CAAC,MAAM;YAChC,IAAI,EAAE,uBAAuB,CAAC,IAAI;YAClC,WAAW,EAAE,uBAAuB,CAAC,WAAW;YAChD,aAAa;SACd,CAAC,CAAC;IACL,CAAC;;AAZH,0DAaC;AAZe,4BAAI,GAAG,4BAA4B,CAAC;AACpC,8BAAM,GAAG,GAAG,CAAC;AACb,mCAAW,GACvB,uDAAuD,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { PlatformError } from './PlatformError';
|
|
2
|
+
import { StandardError } from './StandardError';
|
|
2
3
|
export declare class PayloadPostError extends PlatformError {
|
|
3
4
|
static CODE: string;
|
|
4
5
|
static message: string;
|
|
5
|
-
constructor(stacktrace?: any);
|
|
6
|
+
constructor(stacktrace?: any, standardError?: StandardError);
|
|
6
7
|
}
|
|
7
8
|
//# sourceMappingURL=PayloadPostError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayloadPostError.d.ts","sourceRoot":"","sources":["../../src/errors/PayloadPostError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,gBAAiB,SAAQ,aAAa;IACjD,OAAc,IAAI,SAAwB;IAC1C,OAAc,OAAO,SAAyD;gBAC3D,UAAU,CAAC,EAAE,GAAG;
|
|
1
|
+
{"version":3,"file":"PayloadPostError.d.ts","sourceRoot":"","sources":["../../src/errors/PayloadPostError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,gBAAiB,SAAQ,aAAa;IACjD,OAAc,IAAI,SAAwB;IAC1C,OAAc,OAAO,SAAyD;gBAC3D,UAAU,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,EAAE,aAAa;CAQnE"}
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PayloadPostError = void 0;
|
|
4
4
|
const PlatformError_1 = require("./PlatformError");
|
|
5
5
|
class PayloadPostError extends PlatformError_1.PlatformError {
|
|
6
|
-
constructor(stacktrace) {
|
|
7
|
-
super(PayloadPostError.message, stacktrace, PayloadPostError.CODE);
|
|
6
|
+
constructor(stacktrace, standardError) {
|
|
7
|
+
super(PayloadPostError.message, stacktrace, PayloadPostError.CODE, standardError);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
exports.PayloadPostError = PayloadPostError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayloadPostError.js","sourceRoot":"","sources":["../../src/errors/PayloadPostError.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;
|
|
1
|
+
{"version":3,"file":"PayloadPostError.js","sourceRoot":"","sources":["../../src/errors/PayloadPostError.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAGhD,MAAa,gBAAiB,SAAQ,6BAAa;IAGjD,YAAmB,UAAgB,EAAE,aAA6B;QAChE,KAAK,CACH,gBAAgB,CAAC,OAAO,EACxB,UAAU,EACV,gBAAgB,CAAC,IAAI,EACrB,aAAa,CACd,CAAC;IACJ,CAAC;;AAVH,4CAWC;AAVe,qBAAI,GAAG,oBAAoB,CAAC;AAC5B,wBAAO,GAAG,qDAAqD,CAAC"}
|
|
@@ -15,12 +15,12 @@ class PlatformError extends Error {
|
|
|
15
15
|
enumerable: false,
|
|
16
16
|
writable: false,
|
|
17
17
|
value: {
|
|
18
|
-
type: standardError.type,
|
|
19
|
-
retryable: standardError.retryable,
|
|
18
|
+
type: standardError.type || 'unknown',
|
|
19
|
+
retryable: standardError.retryable || false,
|
|
20
20
|
details: {
|
|
21
21
|
service: standardError.details.service || 'unknown',
|
|
22
|
-
errorCode: standardError.details.errorCode ||
|
|
23
|
-
logMessage: standardError.details.logMessage ||
|
|
22
|
+
errorCode: standardError.details.errorCode || code,
|
|
23
|
+
logMessage: standardError.details.logMessage || description,
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformError.js","sourceRoot":"","sources":["../../src/errors/PlatformError.ts"],"names":[],"mappings":";;;AAAA,oEAGuC;AAGvC,MAAM,IAAI,GAAG,gBAAgB,CAAC;AAE9B,MAAa,aAAc,SAAQ,KAAK;IAKtC,YACE,WAAmB,EACnB,UAAgB,EAChB,IAAI,GAAG,IAAI,EACX,aAA6B;QAE7B,KAAK,CAAC,WAAW,CAAC,CAAC;QACnB,MAAM,CAAC,cAAc,CA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AC,UAAU,IAAI,WAAW;qBAC5D;iBACF;aACF,CAAC,CAAC;SACJ;IACH,CAAC;IAEM,MAAM;QACX,OAAO;YACL,MAAM,EAAE,iCAAc,CAAC,IAAI;YAC3B,KAAK,EAAE;gBACL,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,aAAa,EAAE,IAAI,CAAC,aAAa;aAClC;SACF,CAAC;IACJ,CAAC;CACF;AA5CD,sCA4CC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardError.d.ts","sourceRoot":"","sources":["../../src/errors/StandardError.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,YAAY,GAAG,SAAS,CAAC;CACnC;AAED,oBAAY,SAAS;IACnB,OAAO,IAAI;IACX,QAAQ,IAAI;IACZ,IAAI,IAAI;IACR,YAAY,KAAK;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
1
|
+
{"version":3,"file":"StandardError.d.ts","sourceRoot":"","sources":["../../src/errors/StandardError.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,YAAY,GAAG,SAAS,CAAC;CACnC;AAED,oBAAY,SAAS;IACnB,OAAO,IAAI;IACX,QAAQ,IAAI;IACZ,WAAW,IAAI;IACf,IAAI,IAAI;IACR,YAAY,KAAK;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -5,6 +5,7 @@ var ErrorType;
|
|
|
5
5
|
(function (ErrorType) {
|
|
6
6
|
ErrorType[ErrorType["UNKNOWN"] = 0] = "UNKNOWN";
|
|
7
7
|
ErrorType[ErrorType["PLATFORM"] = 1] = "PLATFORM";
|
|
8
|
+
ErrorType[ErrorType["THIRD_PARTY"] = 2] = "THIRD_PARTY";
|
|
8
9
|
ErrorType[ErrorType["USER"] = 3] = "USER";
|
|
9
10
|
ErrorType[ErrorType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
10
11
|
})(ErrorType = exports.ErrorType || (exports.ErrorType = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardError.js","sourceRoot":"","sources":["../../src/errors/StandardError.ts"],"names":[],"mappings":";;;AAMA,IAAY,
|
|
1
|
+
{"version":3,"file":"StandardError.js","sourceRoot":"","sources":["../../src/errors/StandardError.ts"],"names":[],"mappings":";;;AAMA,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,+CAAW,CAAA;IACX,iDAAY,CAAA;IACZ,uDAAe,CAAA;IACf,yCAAQ,CAAA;IACR,0DAAiB,CAAA;AACnB,CAAC,EANW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAMpB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AbstractError } from './AbstractError';
|
|
2
|
+
import { StandardError } from './StandardError';
|
|
2
3
|
export declare class UncaughtError extends AbstractError {
|
|
3
4
|
static CODE: string;
|
|
4
|
-
constructor(description: string);
|
|
5
|
+
constructor(description: string, standardError?: StandardError);
|
|
5
6
|
}
|
|
6
7
|
//# sourceMappingURL=UncaughtError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UncaughtError.d.ts","sourceRoot":"","sources":["../../src/errors/UncaughtError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"UncaughtError.d.ts","sourceRoot":"","sources":["../../src/errors/UncaughtError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,aAAc,SAAQ,aAAa;IAC9C,OAAc,IAAI,SAAoB;gBACnB,WAAW,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,aAAa;CAQtE"}
|
|
@@ -4,11 +4,12 @@ exports.UncaughtError = void 0;
|
|
|
4
4
|
const AbstractError_1 = require("./AbstractError");
|
|
5
5
|
const InternalError_1 = require("./InternalError");
|
|
6
6
|
class UncaughtError extends AbstractError_1.AbstractError {
|
|
7
|
-
constructor(description) {
|
|
7
|
+
constructor(description, standardError) {
|
|
8
8
|
super({
|
|
9
9
|
code: UncaughtError.CODE,
|
|
10
10
|
httpStatus: InternalError_1.InternalError.STATUS,
|
|
11
11
|
description,
|
|
12
|
+
standardError,
|
|
12
13
|
});
|
|
13
14
|
}
|
|
14
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UncaughtError.js","sourceRoot":"","sources":["../../src/errors/UncaughtError.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAChD,mDAAgD;
|
|
1
|
+
{"version":3,"file":"UncaughtError.js","sourceRoot":"","sources":["../../src/errors/UncaughtError.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAChD,mDAAgD;AAGhD,MAAa,aAAc,SAAQ,6BAAa;IAE9C,YAAmB,WAAmB,EAAE,aAA6B;QACnE,KAAK,CAAC;YACJ,IAAI,EAAE,aAAa,CAAC,IAAI;YACxB,UAAU,EAAE,6BAAa,CAAC,MAAM;YAChC,WAAW;YACX,aAAa;SACd,CAAC,CAAC;IACL,CAAC;;AATH,sCAUC;AATe,kBAAI,GAAG,gBAAgB,CAAC"}
|