@hotmeshio/hotmesh 0.14.0 → 0.14.1
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/package.json
CHANGED
|
@@ -53,12 +53,16 @@ class ErrorHandler {
|
|
|
53
53
|
if (typeof err.name === 'string') {
|
|
54
54
|
error.name = err.name;
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
const result = {
|
|
57
57
|
status: 'error',
|
|
58
58
|
code: config_1.HMSH_CODE_UNKNOWN,
|
|
59
59
|
metadata: { ...input.metadata, guid: (0, utils_1.guid)() },
|
|
60
60
|
data: error,
|
|
61
61
|
};
|
|
62
|
+
if (input._retryAttempt != null) {
|
|
63
|
+
result._retryAttempt = input._retryAttempt;
|
|
64
|
+
}
|
|
65
|
+
return result;
|
|
62
66
|
}
|
|
63
67
|
structureUnacknowledgedError(input) {
|
|
64
68
|
const message = 'stream message max delivery count exceeded';
|
|
@@ -126,6 +130,8 @@ class ErrorHandler {
|
|
|
126
130
|
}
|
|
127
131
|
else {
|
|
128
132
|
const structuredError = this.structureError(input, output);
|
|
133
|
+
structuredError._retryAttempt =
|
|
134
|
+
(input._retryAttempt || 0) + 1;
|
|
129
135
|
return (await publishMessage(null, structuredError));
|
|
130
136
|
}
|
|
131
137
|
}
|