From e22cae7de6e0a2328d23fcbbf685afde5423f813 Mon Sep 17 00:00:00 2001 From: Garth Kidd Date: Wed, 18 Jan 2017 11:21:42 +1100 Subject: [PATCH] Ensure boom.BoomError can be cast to Error (#14075) --- boom/boom-tests.ts | 1 + boom/index.d.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/boom/boom-tests.ts b/boom/boom-tests.ts index 4c2f23ed64..8b5c3bdce6 100644 --- a/boom/boom-tests.ts +++ b/boom/boom-tests.ts @@ -5,3 +5,4 @@ import Boom = require('boom'); Boom.create(500, 'Internal server error', { timestamp: Date.now() }); Boom.wrap(new Error('test'), 400); Boom.badRequest('Invalid cookies'); +Boom.unauthorized() as Error; diff --git a/boom/index.d.ts b/boom/index.d.ts index b252fad1e1..e8cfb5722f 100644 --- a/boom/index.d.ts +++ b/boom/index.d.ts @@ -16,6 +16,7 @@ declare namespace Boom { isServer: boolean; message: string; output: Output; + name: string; } export interface Output {