Socket
Socket
Sign inDemoInstall

@middy/http-json-body-parser

Package Overview
Dependencies
Maintainers
3
Versions
219
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@middy/http-json-body-parser - npm Package Compare versions

Comparing version 3.6.2 to 4.0.0-alpha.0

7

index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc