boom: add missing internal() alias (#16696)

This commit is contained in:
Christian
2017-06-01 18:52:13 +02:00
committed by Mohamed Hegazy
parent cae1ec5491
commit ea7b301f5d
2 changed files with 10 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ Boom.tooManyRequests('message', {some: 'data'});
Boom.illegal('message', {some: 'data'});
Boom.badImplementation('message', {some: 'data'});
Boom.internal('message', {some: 'data'});
Boom.notImplemented('message', {some: 'data'});
Boom.badGateway('message', {some: 'data'});
Boom.serverUnavailable('message', {some: 'data'});

View File

@@ -271,6 +271,15 @@ declare namespace Boom {
*/
export function badImplementation(message?: string, data?: any): BoomError;
/**
* Returns a 500 Internal Server Error error
* Only 500 errors will hide your message from the end user. Your message is recorded in the server log.
* @param message optional message.
* @param data optional additional error data.
* @see {@link https://github.com/hapijs/boom#boombadimplementationmessage-data---alias-internal}
*/
export function internal(message?: string, data?: any): BoomError;
/**
* Returns a 501 Not Implemented error with your error message to the user
* @param message optional message.