lambda-wrap
Advanced tools
Comparing version 3.0.0-alpha.2 to 3.0.0
@@ -38,2 +38,4 @@ 'use strict'; | ||
}; | ||
} else if (typeof res === 'undefined') { | ||
res = null; | ||
} else { | ||
@@ -43,5 +45,7 @@ throw error.badRequest('Auto negotiation of response'); | ||
Object.assign(res, { headers }); | ||
if (res) { | ||
Object.assign(res, { headers }); | ||
} | ||
const logMeta = options.createLogMeta(event, res); | ||
const logMeta = options.createLogMeta(event, res || { statusCode: 0 }); | ||
const logData = options.filterLogData(logMeta, options); | ||
@@ -51,3 +55,5 @@ | ||
if (res.body === null) { | ||
if (!res) { | ||
// leave it, it's ok, that's empty | ||
} else if (res.body === null) { | ||
delete res.body; | ||
@@ -54,0 +60,0 @@ } else if (typeof res.body === 'string') { |
{ | ||
"name": "lambda-wrap", | ||
"version": "3.0.0-alpha.2", | ||
"version": "3.0.0", | ||
"description": "AWS Serverless wrapper for async generators", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
32708
767
1