@middy/http-json-body-parser
Advanced tools
Comparing version 3.6.2 to 4.0.0-alpha.0
@@ -17,8 +17,7 @@ import { createError } from '@middy/util'; | ||
const data = request.event.isBase64Encoded ? Buffer.from(body, 'base64').toString() : body; | ||
request.event.rawBody = body; | ||
request.event.body = JSON.parse(data, reviver); | ||
} catch (cause) { | ||
const error = createError(422, 'Invalid or malformed JSON was provided'); | ||
error.cause = cause; | ||
throw error; | ||
throw createError(422, 'Invalid or malformed JSON was provided', { | ||
cause | ||
}); | ||
} | ||
@@ -25,0 +24,0 @@ }; |
{ | ||
"name": "@middy/http-json-body-parser", | ||
"version": "3.6.2", | ||
"version": "4.0.0-alpha.0", | ||
"description": "Http JSON body parser middleware for the middy framework", | ||
"type": "module", | ||
"engines": { | ||
"node": ">=14" | ||
"node": ">=16" | ||
}, | ||
@@ -67,10 +67,10 @@ "engineStrict": true, | ||
"dependencies": { | ||
"@middy/util": "3.6.2" | ||
"@middy/util": "4.0.0-alpha.0" | ||
}, | ||
"devDependencies": { | ||
"@middy/core": "3.6.2", | ||
"@middy/core": "4.0.0-alpha.0", | ||
"@types/aws-lambda": "^8.10.101", | ||
"type-fest": "^3.0.0" | ||
}, | ||
"gitHead": "4c5d64c72dd4bfde0d3b828a0082c99f688c759c" | ||
"gitHead": "306fb9aa633d5757d11ced3dc192f046ef3c2685" | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
10363
79
1
+ Added@middy/util@4.0.0-alpha.0(transitive)
- Removed@middy/util@3.6.2(transitive)
Updated@middy/util@4.0.0-alpha.0