@mhubcloud/tms_core 3.4.5 → 3.4.6
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/dist/index.js +2 -10
- package/package.json +1 -1
- package/src/defaultPublisher.ts +2 -10
package/dist/index.js
CHANGED
|
@@ -433,19 +433,13 @@ async function defaultPublisher(azureFunctionContext, serviceBusMessage, source,
|
|
|
433
433
|
if (result.status === "rejected") {
|
|
434
434
|
if (result.reason instanceof Error) {
|
|
435
435
|
const formattedError = formatError(result.reason);
|
|
436
|
-
logException(
|
|
437
|
-
azureFunctionContext.log,
|
|
438
|
-
new Error(formattedError.message)
|
|
439
|
-
);
|
|
436
|
+
logException(new Error(formattedError.message));
|
|
440
437
|
throw formattedError;
|
|
441
438
|
} else {
|
|
442
439
|
const formattedError = formatError(
|
|
443
440
|
typeof result.reason === "object" ? JSON.stringify(result.reason) : result.reason
|
|
444
441
|
);
|
|
445
|
-
logException(
|
|
446
|
-
azureFunctionContext.log,
|
|
447
|
-
new Error(formattedError.message)
|
|
448
|
-
);
|
|
442
|
+
logException(new Error(formattedError.message));
|
|
449
443
|
throw formattedError;
|
|
450
444
|
}
|
|
451
445
|
}
|
|
@@ -483,7 +477,6 @@ async function processMessage(message, log2, platformPublisher, trigger) {
|
|
|
483
477
|
publishedAny = true;
|
|
484
478
|
} else {
|
|
485
479
|
logException(
|
|
486
|
-
log2,
|
|
487
480
|
new Error(
|
|
488
481
|
`The message has not been published. Source: ${platformPublisher.source}`
|
|
489
482
|
)
|
|
@@ -492,7 +485,6 @@ async function processMessage(message, log2, platformPublisher, trigger) {
|
|
|
492
485
|
}
|
|
493
486
|
if (!publishedAny) {
|
|
494
487
|
logException(
|
|
495
|
-
log2,
|
|
496
488
|
new Error(
|
|
497
489
|
"The message has not been published to any publisher configuration"
|
|
498
490
|
)
|
package/package.json
CHANGED
package/src/defaultPublisher.ts
CHANGED
|
@@ -41,10 +41,7 @@ export async function defaultPublisher(
|
|
|
41
41
|
if (result.status === 'rejected') {
|
|
42
42
|
if (result.reason instanceof Error) {
|
|
43
43
|
const formattedError = utils.formatError(result.reason);
|
|
44
|
-
utils.logException(
|
|
45
|
-
azureFunctionContext.log,
|
|
46
|
-
new Error(formattedError.message),
|
|
47
|
-
);
|
|
44
|
+
utils.logException(new Error(formattedError.message));
|
|
48
45
|
throw formattedError;
|
|
49
46
|
} else {
|
|
50
47
|
const formattedError = utils.formatError(
|
|
@@ -52,10 +49,7 @@ export async function defaultPublisher(
|
|
|
52
49
|
? JSON.stringify(result.reason)
|
|
53
50
|
: (result.reason as Error['message']),
|
|
54
51
|
);
|
|
55
|
-
utils.logException(
|
|
56
|
-
azureFunctionContext.log,
|
|
57
|
-
new Error(formattedError.message),
|
|
58
|
-
);
|
|
52
|
+
utils.logException(new Error(formattedError.message));
|
|
59
53
|
throw formattedError;
|
|
60
54
|
}
|
|
61
55
|
}
|
|
@@ -112,7 +106,6 @@ async function processMessage(
|
|
|
112
106
|
publishedAny = true;
|
|
113
107
|
} else {
|
|
114
108
|
utils.logException(
|
|
115
|
-
log,
|
|
116
109
|
new Error(
|
|
117
110
|
`The message has not been published. Source: ${platformPublisher.source}`,
|
|
118
111
|
),
|
|
@@ -121,7 +114,6 @@ async function processMessage(
|
|
|
121
114
|
}
|
|
122
115
|
if (!publishedAny) {
|
|
123
116
|
utils.logException(
|
|
124
|
-
log,
|
|
125
117
|
new Error(
|
|
126
118
|
'The message has not been published to any publisher configuration',
|
|
127
119
|
),
|