@etsoo/appscript 1.3.77 → 1.3.78

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.
@@ -11,15 +11,19 @@ class ActionResultError extends Error {
11
11
  */
12
12
  static format(result) {
13
13
  // Additional data
14
- var addtions = [];
14
+ const addtions = [];
15
15
  if (result.status != null)
16
16
  addtions.push(result.status);
17
17
  if (result.type)
18
18
  addtions.push(result.type);
19
19
  if (result.field)
20
20
  addtions.push(result.field);
21
- var add = addtions.length > 0 ? ` (${addtions.join(', ')})` : '';
22
- return `${result.title || 'Error'}${add}`;
21
+ const add = addtions.length > 0 ? ` (${addtions.join(', ')})` : '';
22
+ let title = result.title;
23
+ if (title && result.traceId) {
24
+ title += ` [${result.traceId}]`;
25
+ }
26
+ return `${title || 'Error'}${add}`;
23
27
  }
24
28
  /**
25
29
  * Constructor
@@ -8,15 +8,19 @@ export class ActionResultError extends Error {
8
8
  */
9
9
  static format(result) {
10
10
  // Additional data
11
- var addtions = [];
11
+ const addtions = [];
12
12
  if (result.status != null)
13
13
  addtions.push(result.status);
14
14
  if (result.type)
15
15
  addtions.push(result.type);
16
16
  if (result.field)
17
17
  addtions.push(result.field);
18
- var add = addtions.length > 0 ? ` (${addtions.join(', ')})` : '';
19
- return `${result.title || 'Error'}${add}`;
18
+ const add = addtions.length > 0 ? ` (${addtions.join(', ')})` : '';
19
+ let title = result.title;
20
+ if (title && result.traceId) {
21
+ title += ` [${result.traceId}]`;
22
+ }
23
+ return `${title || 'Error'}${add}`;
20
24
  }
21
25
  /**
22
26
  * Constructor
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.3.77",
3
+ "version": "1.3.78",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -10,14 +10,18 @@ export class ActionResultError extends Error {
10
10
  */
11
11
  static format(result: IActionResult) {
12
12
  // Additional data
13
- var addtions = [];
13
+ const addtions = [];
14
14
  if (result.status != null) addtions.push(result.status);
15
15
  if (result.type) addtions.push(result.type);
16
16
  if (result.field) addtions.push(result.field);
17
17
 
18
- var add = addtions.length > 0 ? ` (${addtions.join(', ')})` : '';
18
+ const add = addtions.length > 0 ? ` (${addtions.join(', ')})` : '';
19
+ let title = result.title;
20
+ if (title && result.traceId) {
21
+ title += ` [${result.traceId}]`;
22
+ }
19
23
 
20
- return `${result.title || 'Error'}${add}`;
24
+ return `${title || 'Error'}${add}`;
21
25
  }
22
26
 
23
27
  /**