notification-processor 6.0.6-alpha.2 → 6.1.0

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/CHANGELOG.md CHANGED
@@ -1,9 +1,21 @@
1
- ## [6.0.6-alpha.2](https://github.com/Parsimotion/notification-processor/compare/v6.0.6-alpha.1...v6.0.6-alpha.2) (2026-02-19)
1
+ # [6.1.0](https://github.com/Parsimotion/notification-processor/compare/v6.0.6...v6.1.0) (2026-04-16)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * add logs ([07bab16](https://github.com/Parsimotion/notification-processor/commit/07bab16acd79f3fceb24a61139b51795537e2cc7))
6
+ * vuelvo script para atras ([805d0ed](https://github.com/Parsimotion/notification-processor/commit/805d0edee15651511d88f85f86fec2bb2ed5ba4d))
7
+
8
+
9
+ ### Features
10
+
11
+ * agrego shouldretry antes del process, corrijo script ([3d983e3](https://github.com/Parsimotion/notification-processor/commit/3d983e3fed98d054c3da29a0cd29700a57bb7b66))
12
+
13
+ ## [6.0.6](https://github.com/Parsimotion/notification-processor/compare/v6.0.5...v6.0.6) (2026-03-13)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * Handle error in job processor with notifications ([80e1dfb](https://github.com/Parsimotion/notification-processor/commit/80e1dfb53df880e38efa456a023454833dfc4b2c))
7
19
 
8
20
  ## [6.0.5](https://github.com/Parsimotion/notification-processor/compare/v6.0.4...v6.0.5) (2026-02-19)
9
21
 
package/copyToFunction CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/bin/bash
2
2
  FUNCTION=$1
3
3
 
4
- npm run build
4
+ npm run build
5
5
  echo "Removing old version from $FUNCTION"
6
6
  rm -rf "../$FUNCTION/node_modules/notification-processor/lib/"
7
7
  echo "Removed. Copying new version to $FUNCTION"
@@ -103,21 +103,16 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
103
103
 
104
104
  var message = _ref3.message;
105
105
 
106
- var errorMessage;
106
+ var errorMessage, ref, ref1, ref2;
107
107
  boundMethodCheck(this, JobProcessor);
108
108
  errorMessage = {
109
109
  message: message,
110
- statusCode: error.detail.response.statusCode,
110
+ statusCode: error != null ? (ref = error.detail) != null ? (ref1 = ref.response) != null ? ref1.statusCode : void 0 : void 0 : void 0,
111
111
  error: error,
112
- request: _.omit(error.detail.request, ["resolveWithFullResponse"])
112
+ request: _.omit(error != null ? (ref2 = error.detail) != null ? ref2.request : void 0 : void 0, ["resolveWithFullResponse"])
113
113
  };
114
114
  return this._ifJobIsNotStopped(message, function () {
115
- console.log("Max retry exceeded for job " + message.JobId + " with error " + errorMessage.error);
116
- console.log("Sending NotificationsApi fail");
117
- return _this4._notificationsApi(message).fail(errorMessage).then(function (response) {
118
- console.log("NotificationsApi fail response: " + response);
119
- return response;
120
- }).throw(new NonRetryable("Max retry exceeded", error));
115
+ return _this4._notificationsApi(message).fail(errorMessage).throw(new NonRetryable("Max retry exceeded", error));
121
116
  });
122
117
  }
123
118
  }, {
@@ -204,9 +204,6 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
204
204
  }
205
205
  console.log("Error sending status to notifications-api. Retrying via notifications-api-async");
206
206
  return retryRequest();
207
- }).tapCatch(function (e) {
208
- console.log("Error sending status to notifications-api-async. Ignoring error.");
209
- return console.log(e);
210
207
  }).catchReturn();
211
208
  }
212
209
  }, {
@@ -30,6 +30,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
30
30
  value: function process(notification, context, executionId) {
31
31
  var _this = this;
32
32
 
33
+ if (!this._shouldRetry_(notification)) {
34
+ this._onMaxRetryExceeded_(notification, new Error("max retries exceeded"));
35
+ }
33
36
  return this.processor(notification, context, executionId).tap(function (it) {
34
37
  return _this._onSuccess_(notification, it);
35
38
  }).catch(function (err) {
@@ -48,7 +51,6 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
48
51
  var _ref2$meta$dequeueCou = _ref2.meta.dequeueCount,
49
52
  dequeueCount = _ref2$meta$dequeueCou === undefined ? 0 : _ref2$meta$dequeueCou;
50
53
 
51
- console.log("dequeue count is " + dequeueCount + " and max retries is " + this.maxRetries);
52
54
  return dequeueCount < this.maxRetries;
53
55
  }
54
56
  }, {
@@ -12,7 +12,7 @@
12
12
  message = _ref.message;
13
13
 
14
14
  return {
15
- message: !_.isObject(message.Message) ? JSON.parse(message.Message) : message.Message,
15
+ message: message,
16
16
  meta: {
17
17
  insertionTime: _.get(context, "bindingData.sentTimestamp"),
18
18
  dequeueCount: _.get(context, "bindingData.approximateReceiveCount"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notification-processor",
3
- "version": "6.0.6-alpha.2",
3
+ "version": "6.1.0",
4
4
  "description": "notification-processor",
5
5
  "main": "index.js",
6
6
  "scripts": {