Socket
Socket
Sign inDemoInstall

boom

Package Overview
Dependencies
Maintainers
5
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boom - npm Package Compare versions

Comparing version 7.2.2 to 7.3.0

CHANGELOG.md

4

lib/index.js

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

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