Skip to content

Commit a45dec3

Browse files
authored
Merge pull request #5 from gunnargrosch/develop
Fixed issue with exception injection not throwing the exception
2 parents 5343ff5 + 17d85b0 commit a45dec3

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ Inspired by Yan Cui's articles on latency injection for AWS Lambda (https://hack
5757

5858
## Changelog
5959

60+
### 2020-02-13 v0.1.1
61+
62+
* Fixed issue with exception injection not throwing the exception. Thanks to [Jason Barto](https://github.com/jpbarto)!
63+
6064
### 2019-12-30 v0.1.0
6165

6266
* Added disk space failure.
@@ -68,4 +72,4 @@ Inspired by Yan Cui's articles on latency injection for AWS Lambda (https://hack
6872

6973
## Authors
7074

71-
**Gunnar Grosch** - [GitHub](https://github.com/gunnargrosch) | [Twitter](https://twitter.com/gunnargrosch) | [LinkedIn](https://www.linkedin.com/in/gunnargrosch/)
75+
**Gunnar Grosch** - [GitHub](https://github.com/gunnargrosch) | [Twitter](https://twitter.com/gunnargrosch) | [LinkedIn](https://www.linkedin.com/in/gunnargrosch/)

lib/failure.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const aws = require('aws-sdk')
33
const ssm = new aws.SSM()
44
const childProcess = require('child_process')
55

6-
async function getConfig () {
6+
async function getConfig() {
77
try {
88
let params = {
99
Name: process.env.FAILURE_INJECTION_PARAM
@@ -41,6 +41,7 @@ var injectFailure = function (fn) {
4141
return fn.apply(this, arguments)
4242
} catch (ex) {
4343
console.log(ex)
44+
throw ex
4445
}
4546
}
4647
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "failure-lambda",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Module for failure injection into AWS Lambda",
55
"main": "./lib/failure.js",
66
"scripts": {

0 commit comments

Comments
 (0)