{
"errorType": "TypeError",
"errorMessage": "Cannot use 'in' operator to search for 'batchItemFailures' in null",
"stack": [
"TypeError: Cannot use 'in' operator to search for 'batchItemFailures' in null",
" at isBatchItemFailure (/opt/nodejs/node_modules/datadog-lambda-js/utils/batch-item-failures.js:6:29)",
" at /opt/nodejs/node_modules/datadog-lambda-js/index.js:243:80",
" at step (/opt/nodejs/node_modules/datadog-lambda-js/index.js:44:23)",
" at Object.next (/opt/nodejs/node_modules/datadog-lambda-js/index.js:25:53)",
" at fulfilled (/opt/nodejs/node_modules/datadog-lambda-js/index.js:16:58)"
]
}
Expected Behavior
It should be possible to return
null
from a Lambda FunctionActual Behavior
https://github.com/DataDog/datadog-lambda-js/blob/a7a56f18f9e938c3736ef4933bc2eecce3afe303/src/utils/batch-item-failures.ts#L4
this fails because
typeof null === "object"
Steps to Reproduce the Problem
null
Specifications
Stacktrace