import type { HttpError, HttpErrorData } from '@goatlab/js-utils'; import type { NextFunction, Request, Response } from 'express'; /** * Sanitize error messages for production environment * Prevents leaking sensitive information in error responses */ export declare function sanitizeErrorForProduction(error: HttpError): HttpError; /** * Production-ready error handler middleware * Ensures no sensitive information is leaked in error responses */ export declare function productionErrorHandler(): (err: any, req: Request, res: Response, next: NextFunction) => void; /** * Async error wrapper to catch errors in async route handlers */ export declare function asyncErrorHandler(fn: (req: Request, res: Response, next: NextFunction) => Promise | unknown): (req: Request, res: Response, next: NextFunction) => void;