notification-processor 4.21.0 → 4.23.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.
@@ -133,6 +133,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
133
133
  theRequest = _.get(error, "detail.request") || _.get(error, "cause.detail.request");
134
134
  errorType = _this3._retrieveMessageFromError(error, TYPE_PROPERTIES, "unknown");
135
135
  errorMessage = _this3._retrieveMessageFromError(error, MESSAGE_PROPERTIES, "");
136
+ if (/the operation did not complete within the allocated time/gi.test(errorType)) {
137
+ errorType = "timed_out";
138
+ }
136
139
  now = new Date();
137
140
  return {
138
141
  id: id,
@@ -6,7 +6,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
6
6
 
7
7
  // Generated by CoffeeScript 2.7.0
8
8
  (function () {
9
- var IgnoredError, MaxRetriesProcessor;
9
+ var IgnoredError, MaxRetriesProcessor, Promise;
10
+
11
+ Promise = require("bluebird");
10
12
 
11
13
  IgnoredError = require("../exceptions/ignored.error");
12
14
 
@@ -18,6 +20,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
18
20
 
19
21
  _classCallCheck(this, MaxRetriesProcessor);
20
22
 
23
+ this._onIgnoredError_ = this._onIgnoredError_.bind(this);
21
24
  this.processor = processor;
22
25
  this.maxRetries = maxRetries;
23
26
  }
@@ -65,7 +68,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
65
68
  }, {
66
69
  key: "_onIgnoredError_",
67
70
  value: function _onIgnoredError_(notification, err) {
68
- throw err;
71
+ var _this2 = this;
72
+
73
+ return Promise.try(function () {
74
+ return _this2._onSuccess_(notification, err);
75
+ }).tap(function () {
76
+ throw err;
77
+ });
69
78
  }
70
79
  }, {
71
80
  key: "_isIgnoredError_",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notification-processor",
3
- "version": "4.21.0",
3
+ "version": "4.23.0",
4
4
  "description": "notification-processor",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/.node-version DELETED
@@ -1 +0,0 @@
1
- 12.22.12