import type Express from 'express'; import type { SentryService } from '../sentry/sentry.service'; export interface GenericErrorMiddlewareCfg { sentryService?: SentryService; /** * Defaults to false. * So, by default, it will report ALL errors, not only 5xx. */ reportOnly5xx?: boolean; } /** * Generic error handler. * Returns HTTP code based on err.data.httpStatusCode (default to 500). * Sends json payload as ErrorResponse, transformed via errorSharedUtil. */ export declare function genericErrorMiddleware(cfg?: GenericErrorMiddlewareCfg): any; export declare function respondWithError(_request: Express.Request, res: Express.Response, error: any): void;