@lido-nestjs/execution 1.9.1 → 1.9.2

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.
@@ -54,7 +54,8 @@ exports.ExtendedJsonRpcBatchProvider = class ExtendedJsonRpcBatchProvider extend
54
54
  return this._fetchMiddlewareService.go(() => this.fetchJson(this.connection, JSON.stringify(batchRequest)), {
55
55
  provider: this,
56
56
  });
57
- }).then((batchResult) => {
57
+ })
58
+ .then((batchResult) => {
58
59
  this.emit('debug', {
59
60
  action: 'response',
60
61
  request: properties.deepCopy(batchRequest),
@@ -89,6 +90,18 @@ exports.ExtendedJsonRpcBatchProvider = class ExtendedJsonRpcBatchProvider extend
89
90
  batch.forEach((inflightRequest) => {
90
91
  inflightRequest.reject(error);
91
92
  });
93
+ })
94
+ .catch((error) => {
95
+ // catch errors happening in the 'then' callback
96
+ this.emit('debug', {
97
+ action: 'response',
98
+ error: error,
99
+ request: properties.deepCopy(batchRequest),
100
+ provider: this,
101
+ });
102
+ batch.forEach((inflightRequest) => {
103
+ inflightRequest.reject(error);
104
+ });
92
105
  });
93
106
  }
94
107
  this._batchAggregator && clearTimeout(this._batchAggregator);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lido-nestjs/execution",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "license": "MIT",