We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3520fd3 commit 437e753Copy full SHA for 437e753
1 file changed
src/Wrapper/LambdaWrapper.js
@@ -14,7 +14,8 @@ import ResponseModel from '../Model/Response.model';
14
export const handleSuccess = (di, outcome) => {
15
const logger = di.get(DEFINITIONS.LOGGER);
16
17
- logger.metric('lambda.statusCode', outcome.statusCode || 200);
+ // Outcome may be undefined as not all lambdas have a return value.
18
+ logger.metric('lambda.statusCode', (outcome && outcome.statusCode) || 200);
19
20
return outcome;
21
};
0 commit comments