@lwrjs/diagnostics 0.21.8 → 0.22.2
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/build/es/errors.js +22 -11
- package/package.json +5 -5
package/build/es/errors.js
CHANGED
|
@@ -4,36 +4,45 @@ export function isNodeError(error) {
|
|
|
4
4
|
}
|
|
5
5
|
// LWR-Node base error class from which all others extend
|
|
6
6
|
export class LwrError extends Error {
|
|
7
|
-
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.name = 'LwrError';
|
|
10
|
+
}
|
|
8
11
|
}
|
|
9
12
|
// 500 - All errors which are instances of Error or LwrServerError will impact availability metrics
|
|
10
13
|
export class LwrServerError extends LwrError {
|
|
11
|
-
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.name = 'LwrServerError';
|
|
17
|
+
}
|
|
12
18
|
}
|
|
13
19
|
// 500 - app layer does not affect availability
|
|
14
20
|
export class LwrApplicationError extends LwrError {
|
|
15
|
-
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments);
|
|
23
|
+
this.name = 'LwrApplicationError';
|
|
24
|
+
}
|
|
16
25
|
}
|
|
17
26
|
// 400
|
|
18
27
|
export class LwrInvalidError extends LwrError {
|
|
19
|
-
|
|
28
|
+
constructor() {
|
|
29
|
+
super(...arguments);
|
|
30
|
+
this.name = 'LwrInvalidError';
|
|
31
|
+
}
|
|
20
32
|
}
|
|
21
33
|
// 404
|
|
22
34
|
export class LwrUnresolvableError extends LwrError {
|
|
23
|
-
name = 'LwrUnresolvableError';
|
|
24
|
-
type; // eg: "bundle", "asset"
|
|
25
35
|
constructor(message, type) {
|
|
26
36
|
super(message);
|
|
37
|
+
this.name = 'LwrUnresolvableError';
|
|
27
38
|
this.type = type;
|
|
28
39
|
}
|
|
29
40
|
}
|
|
30
41
|
// 301, 302, 429, 503
|
|
31
42
|
export class LwrStatusError extends LwrError {
|
|
32
|
-
name = 'LwrStatusError';
|
|
33
|
-
status;
|
|
34
|
-
headers; // for Location, Cache-Control, etc
|
|
35
43
|
constructor(message, status, headers) {
|
|
36
44
|
super(message);
|
|
45
|
+
this.name = 'LwrStatusError';
|
|
37
46
|
this.status = status;
|
|
38
47
|
this.headers = headers;
|
|
39
48
|
}
|
|
@@ -44,10 +53,12 @@ export class DiagnosticsError extends LwrError {
|
|
|
44
53
|
this.diagnostics = diagnostics;
|
|
45
54
|
this.name = 'LwrDiagnosticsError';
|
|
46
55
|
}
|
|
47
|
-
diagnostics;
|
|
48
56
|
}
|
|
49
57
|
// fatal config validation issues
|
|
50
58
|
export class LwrConfigError extends DiagnosticsError {
|
|
51
|
-
|
|
59
|
+
constructor() {
|
|
60
|
+
super(...arguments);
|
|
61
|
+
this.name = 'LwrConfigError';
|
|
62
|
+
}
|
|
52
63
|
}
|
|
53
64
|
//# sourceMappingURL=errors.js.map
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.22.2",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
"test": "jest"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@lwrjs/types": "0.
|
|
38
|
+
"@lwrjs/types": "0.22.2",
|
|
39
39
|
"jest": "29.7.0",
|
|
40
40
|
"ts-jest": "^29.2.6",
|
|
41
|
-
"typescript": "
|
|
41
|
+
"typescript": "5.0.4"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
|
-
"node": ">=
|
|
44
|
+
"node": ">=22.0.0"
|
|
45
45
|
},
|
|
46
46
|
"volta": {
|
|
47
47
|
"extends": "../../../package.json"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "30870e466e15e6691d238e75836e9266a45203e3"
|
|
50
50
|
}
|