Comparing version 6.0.3 to 6.0.4
@@ -9,2 +9,3 @@ 'use strict'; | ||
const Boom = require('boom'); | ||
const Bounce = require('bounce'); | ||
const Hoek = require('hoek'); | ||
@@ -195,2 +196,3 @@ const Iron = require('iron'); | ||
catch (err) { | ||
Bounce.rethrow(err, 'system'); | ||
record(err, name, value, definition); | ||
@@ -214,2 +216,3 @@ } | ||
catch (err) { | ||
Bounce.rethrow(err, 'system'); | ||
record(err, name, value, definition); | ||
@@ -308,3 +311,8 @@ } | ||
const decoded = (new Buffer(value, 'base64')).toString('binary'); | ||
return JSON.parse(decoded); | ||
try { | ||
return JSON.parse(decoded); | ||
} | ||
catch (err) { | ||
throw Boom.badRequest('Invalid JSON payload'); | ||
} | ||
} | ||
@@ -311,0 +319,0 @@ |
{ | ||
"name": "statehood", | ||
"description": "HTTP State Management Utilities", | ||
"version": "6.0.3", | ||
"version": "6.0.4", | ||
"repository": "git://github.com/hapijs/statehood", | ||
@@ -18,2 +18,3 @@ "main": "lib/index.js", | ||
"boom": "7.x.x", | ||
"bounce": "1.x.x", | ||
"hoek": "5.x.x", | ||
@@ -20,0 +21,0 @@ "iron": "5.x.x", |
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
16565
364
5
+ Addedbounce@1.x.x
+ Addedbounce@1.2.3(transitive)