@lokalise/fastify-extras
Version:
Opinionated set of fastify plugins, commonly used in Lokalise
11 lines (10 loc) • 538 B
TypeScript
import type { ErrorReporter } from '@lokalise/node-core';
import type { FastifyPluginCallback } from 'fastify';
export declare const commonErrorObjectResolver: ErrorObjectResolver;
export type ErrorObjectResolver = (err: unknown, correlationId?: string) => unknown;
export interface UnhandledExceptionPluginOptions {
errorObjectResolver: ErrorObjectResolver;
errorReporter: ErrorReporter;
shutdownAfterHandling: boolean;
}
export declare const unhandledExceptionPlugin: FastifyPluginCallback<UnhandledExceptionPluginOptions>;