notification-processor 6.0.6-alpha.2 → 6.0.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/CHANGELOG.md CHANGED
@@ -1,9 +1,9 @@
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.0.6](https://github.com/Parsimotion/notification-processor/compare/v6.0.5...v6.0.6) (2026-03-13)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * add logs ([07bab16](https://github.com/Parsimotion/notification-processor/commit/07bab16acd79f3fceb24a61139b51795537e2cc7))
6
+ * Handle error in job processor with notifications ([80e1dfb](https://github.com/Parsimotion/notification-processor/commit/80e1dfb53df880e38efa456a023454833dfc4b2c))
7
7
 
8
8
  ## [6.0.5](https://github.com/Parsimotion/notification-processor/compare/v6.0.4...v6.0.5) (2026-02-19)
9
9
 
@@ -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
  }, {
@@ -48,7 +48,6 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
48
48
  var _ref2$meta$dequeueCou = _ref2.meta.dequeueCount,
49
49
  dequeueCount = _ref2$meta$dequeueCou === undefined ? 0 : _ref2$meta$dequeueCou;
50
50
 
51
- console.log("dequeue count is " + dequeueCount + " and max retries is " + this.maxRetries);
52
51
  return dequeueCount < this.maxRetries;
53
52
  }
54
53
  }, {
@@ -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.0.6",
4
4
  "description": "notification-processor",
5
5
  "main": "index.js",
6
6
  "scripts": {