create-boom-error
Version:
Simply create sub-classed Boom errors for Hapi applications.
13 lines (8 loc) • 389 B
TypeScript
import { Boom } from '@hapi/boom';
declare class DecoratedBoom extends Boom<any> {
constructor(...args: any[])
name: string;
code: string;
}
export declare function isDecoratedBoom(err: unknown): err is DecoratedBoom;
export declare function createBoomError(name: string, statusCode: number, message?: string | ((...args: any[]) => string), code?: string): typeof DecoratedBoom;