diff --git a/src/LambdaReq.js b/src/LambdaReq.js index b022da2..0fe41d3 100644 --- a/src/LambdaReq.js +++ b/src/LambdaReq.js @@ -158,7 +158,7 @@ class LambdaReq { _respondToApiGateway (error, response) { log('handling APIGateway response: %s %o', error, response) - let statusCode + let statusCode = 200 if (error) { statusCode = 500 diff --git a/tests/unit/LambdaReq.js b/tests/unit/LambdaReq.js index 90b7be4..f555c47 100644 --- a/tests/unit/LambdaReq.js +++ b/tests/unit/LambdaReq.js @@ -43,6 +43,7 @@ describe('LambdaReq', () => { lambda )).eql(true) should(callback.getCall(0).args[1]).containEql({ + statusCode: 200, body: '{"success":true}' }) }) @@ -62,6 +63,7 @@ describe('LambdaReq', () => { lambda )).eql(true) should(callback.getCall(0).args[1]).containEql({ + statusCode: 200, body: '{"success":true}' }) })