Comparing version 7.2.2 to 7.3.0
@@ -416,3 +416,3 @@ 'use strict'; | ||
internals.reformat = function () { | ||
internals.reformat = function (debug = false) { | ||
@@ -422,3 +422,3 @@ this.output.payload.statusCode = this.output.statusCode; | ||
if (this.output.statusCode === 500) { | ||
if (this.output.statusCode === 500 && debug !== true) { | ||
this.output.payload.message = 'An internal server error occurred'; // Hide actual error from user | ||
@@ -425,0 +425,0 @@ } |
{ | ||
"name": "boom", | ||
"description": "HTTP-friendly error objects", | ||
"version": "7.2.2", | ||
"version": "7.3.0", | ||
"repository": "git://github.com/hapijs/boom", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
@@ -8,3 +8,3 @@ ![boom Logo](https://raw.github.com/hapijs/boom/master/images/boom.png) | ||
Lead Maintainer: [Adam Bretz](https://github.com/arb) | ||
Lead Maintainer: [Eran Hammer](https://github.com/hueniverse) | ||
@@ -14,2 +14,3 @@ <!-- toc --> | ||
- [Boom](#boom) | ||
- [`reformat(debug)`](#reformatdebug) | ||
- [Helper Methods](#helper-methods) | ||
@@ -78,4 +79,9 @@ - [`new Boom(message, [options])`](#new-boommessage-options) | ||
The `Boom` object also supports the following method: | ||
- `reformat()` - rebuilds `error.output` using the other object properties. | ||
### `reformat(debug)` | ||
Rebuilds `error.output` using the other object properties where: | ||
- `debug` - a Boolean that, when `true`, causes Internal Server Error messages to be left in tact. Defaults to `false`, meaning that Internal Server Error messages are redacted. | ||
Note that `Boom` object will return `true` when used with `instanceof Boom`, but do not use the | ||
@@ -82,0 +88,0 @@ `Boom` prototype (they are either plain `Error` or the error prototype passed in). This means |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
5
811
36885