UNPKG

hapi-error

Version:

catch errors in your hapi application and display the appropriate error message/page

27 lines (19 loc) 451 B
/// <reference types="@types/hapi" /> import { Plugin, Request, ResponseObject, } from '@hapi/hapi'; declare namespace hapiError{ interface Options { statusCodes?: {}; } type handleError = (error: Error, errorMessage: string) => boolean; } declare const hapiError: Plugin<hapiError.Options>; export = hapiError; declare module 'hapi' { interface Request { handleError: hapiError.handleError; } }