Skip to content

Commit 437e753

Browse files
fix: Don't expect all lambdas to have a return value (#328)
1 parent 3520fd3 commit 437e753

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Wrapper/LambdaWrapper.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ import ResponseModel from '../Model/Response.model';
1414
export const handleSuccess = (di, outcome) => {
1515
const logger = di.get(DEFINITIONS.LOGGER);
1616

17-
logger.metric('lambda.statusCode', outcome.statusCode || 200);
17+
// Outcome may be undefined as not all lambdas have a return value.
18+
logger.metric('lambda.statusCode', (outcome && outcome.statusCode) || 200);
1819

1920
return outcome;
2021
};

0 commit comments

Comments
 (0)