@middy/http-json-body-parser
Advanced tools
Comparing version 4.6.1 to 4.6.2
@@ -14,3 +14,3 @@ import { createError } from '@middy/util'; | ||
const { headers, body } = request.event; | ||
const contentType = headers['Content-Type'] ?? headers['content-type']; | ||
const contentType = headers?.['Content-Type'] ?? headers?.['content-type']; | ||
if (!mimePattern.test(contentType)) { | ||
@@ -28,2 +28,3 @@ if (options.disableContentTypeError) { | ||
} catch (cause) { | ||
// UnprocessableEntity | ||
throw createError(415, 'Invalid or malformed JSON was provided', { | ||
@@ -30,0 +31,0 @@ cause |
{ | ||
"name": "@middy/http-json-body-parser", | ||
"version": "4.6.1", | ||
"version": "4.6.2", | ||
"description": "Http JSON body parser middleware for the middy framework", | ||
@@ -71,10 +71,10 @@ "type": "module", | ||
"dependencies": { | ||
"@middy/util": "4.6.1" | ||
"@middy/util": "4.6.2" | ||
}, | ||
"devDependencies": { | ||
"@middy/core": "4.6.1", | ||
"@middy/core": "4.6.2", | ||
"@types/aws-lambda": "^8.10.101", | ||
"type-fest": "^4.0.0" | ||
}, | ||
"gitHead": "253ed0e4ca95623decbade03938a07d837a1eba2" | ||
"gitHead": "8b03a01abf5a9c08231ec5ced775e87f8be8f67d" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
10544
146
+ Added@middy/util@4.6.2(transitive)
- Removed@middy/util@4.6.1(transitive)
Updated@middy/util@4.6.2