import { ExpsRequest, ExpsResponse, ExpsNextFunction } from '../TYPES'; /** * Middleware to handle errors in the request pipeline. * * This middleware function processes errors that occur during the request pipeline. * It distinguishes between custom errors and other errors, formats the response body accordingly, * and optionally encrypts the response if an encryption key is available. * * @export * @param {Error} piplelineError - The error object caught in the pipeline. * @param {ExpsRequest} request - The Express request object. * @param {ExpsResponse} response - The Express response object. * @param {ExpsNextFunction} next - The next middleware function in the stack. */ export declare function handleError(piplelineError: Error, request: ExpsRequest, response: ExpsResponse, next: ExpsNextFunction): void;