@chubbyts/chubbyts-framework
Version:
A minimal, highly performant middleware PSR-15 inspired function based micro framework built with as little complexity as possible, aimed primarily at those developers who want to understand all the vendors they use.
13 lines (12 loc) • 649 B
TypeScript
import type { Logger } from '@chubbyts/chubbyts-log-types/dist/log';
import type { MapToHttpError } from '@chubbyts/chubbyts-http-error/dist/http-error';
import type { Middleware } from '@chubbyts/chubbyts-undici-server/dist/server';
/**
* ```ts
* import type { Middleware } from '@chubbyts/chubbyts-undici-for-server/dist/middleware';
* import { createErrorMiddleware } from '@chubbyts/chubbyts-framework/dist/middleware/error-middleware';
*
* const errorMiddleware: Middleware = createErrorMiddleware();
* ```
*/
export declare const createErrorMiddleware: (debug?: boolean, logger?: Logger, mapToHttpError?: MapToHttpError) => Middleware;