@hapi/hapi
Advanced tools
Comparing version 20.0.2 to 20.0.3
@@ -349,5 +349,17 @@ 'use strict'; | ||
if (custom) { | ||
res.result = custom.result; | ||
delete res.raw.res[Config.symbol]; | ||
res.request = custom.request; | ||
delete res.raw.res[Config.symbol]; | ||
if (custom.result !== undefined) { | ||
res.result = custom.result; | ||
} | ||
if (custom.statusCode !== undefined) { | ||
res.statusCode = custom.statusCode; | ||
} | ||
if (custom.statusMessage !== undefined) { | ||
res.statusMessage = custom.statusMessage; | ||
} | ||
} | ||
@@ -354,0 +366,0 @@ |
@@ -299,3 +299,4 @@ 'use strict'; | ||
if (request.raw.res[Config.symbol]) { | ||
request.raw.res.statusCode = error.statusCode; | ||
request.raw.res[Config.symbol].statusCode = error.statusCode; | ||
request.raw.res[Config.symbol].statusMessage = error.source.error; | ||
request.raw.res[Config.symbol].result = error.source; // Force injected response to error | ||
@@ -302,0 +303,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://hapi.dev", | ||
"version": "20.0.2", | ||
"version": "20.0.3", | ||
"repository": "git://github.com/hapijs/hapi", | ||
@@ -8,0 +8,0 @@ "main": "lib/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
181208
4572