UNPKG

@chubbyts/chubbyts-api

Version:

[![CI](https://github.com/chubbyts/chubbyts-api/workflows/CI/badge.svg?branch=master)](https://github.com/chubbyts/chubbyts-api/actions?query=workflow%3ACI) [![Coverage Status](https://coveralls.io/repos/github/chubbyts/chubbyts-api/badge.svg?branch=maste

8 lines (7 loc) 674 B
import type { HttpError } from '@chubbyts/chubbyts-http-error/dist/http-error'; import type { ResponseFactory } from '@chubbyts/chubbyts-http-types/dist/message-factory'; import type { Encoder } from '@chubbyts/chubbyts-decode-encode/dist/encoder'; import type { Logger } from '@chubbyts/chubbyts-log-types/dist/log'; import type { Middleware } from '@chubbyts/chubbyts-http-types/dist/middleware'; export type MapToHttpError = (e: unknown) => HttpError; export declare const createErrorMiddleware: (responseFactory: ResponseFactory, encoder: Encoder, mapToHttpError?: MapToHttpError, debug?: boolean, logger?: Logger, loggableAttributeNames?: Array<string>) => Middleware;