boom
Advanced tools
Comparing version 5.0.0 to 5.1.0
@@ -102,2 +102,4 @@ 'use strict'; | ||
internals.initialize(error, statusCode); | ||
error.typeof = ctor; | ||
return error; | ||
@@ -126,3 +128,2 @@ }; | ||
error.reformat = internals.reformat; | ||
error.reformat(); | ||
@@ -132,2 +133,3 @@ if (!message && | ||
error.reformat(); | ||
message = error.output.payload.error; | ||
@@ -141,2 +143,3 @@ } | ||
error.reformat(); | ||
return error; | ||
@@ -143,0 +146,0 @@ }; |
{ | ||
"name": "boom", | ||
"description": "HTTP-friendly error objects", | ||
"version": "5.0.0", | ||
"version": "5.1.0", | ||
"repository": "git://github.com/hapijs/boom", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
@@ -58,2 +58,3 @@ ![boom Logo](https://raw.github.com/hapijs/boom/master/images/boom.png) | ||
- `message` - the error message. | ||
- `typeof` - the contructor used to create the error (e.g. `Boom.badRequest`). | ||
- `output` - the formatted response. Can be directly manipulated after object construction to return a custom | ||
@@ -60,0 +61,0 @@ error response. Allowed root keys: |
32780
288
762