@aesop-fables/triginta 0.9.2 → 0.9.3

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.
@@ -77,6 +77,15 @@ let SqsLambdaFactory = class SqsLambdaFactory {
77
77
  const message = yield deserializer.deserializeMessage(record);
78
78
  yield innerHandler.handle(message, record, event);
79
79
  }
80
+ catch (e) {
81
+ const failureHandler = childContainer.get(SqsLambdaServices_1.SqsLambdaServices.FailureHandler);
82
+ const shouldReport = yield failureHandler.onError(record, e);
83
+ if (shouldReport) {
84
+ response.batchItemFailures.push({
85
+ itemIdentifier: record.messageId,
86
+ });
87
+ }
88
+ }
80
89
  finally {
81
90
  if (childContainer) {
82
91
  try {
@@ -89,13 +98,9 @@ let SqsLambdaFactory = class SqsLambdaFactory {
89
98
  }
90
99
  }
91
100
  catch (e) {
92
- const failureHandler = this.container.get(SqsLambdaServices_1.SqsLambdaServices.FailureHandler);
93
- const shouldReport = yield failureHandler.onError(record, e);
94
- if (shouldReport) {
95
- response.batchItemFailures.push({
96
- itemIdentifier: record.messageId,
97
- });
98
- }
101
+ // We need to revisit this
102
+ // https://github.com/aesop-fables/triginta/issues/199
103
+ throw e;
99
104
  }
100
105
  }
101
106
  return response;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aesop-fables/triginta",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "description": "A lightweight framework that wraps the basic infrastructure usages of AWS Lambda (SQS, Kinesis, etc.).",
5
5
  "type": "commonjs",
6
6
  "exports": {