/** * SecureErrorHandler - Sanitizes error messages to prevent information disclosure * * SECURITY: Addresses Issue #206 - Information Disclosure via Error Messages * - Prevents exposure of file paths, system details, and internal structure * - Maps system errors to safe user-friendly messages * - Preserves full error details for secure logging * - Different behavior for production vs development environments */ export interface SanitizedError { message: string; code?: string; requestId?: string; } export declare class SecureErrorHandler { private static readonly SANITIZATION_PATTERNS; private static readonly ERROR_MAP; /** * Sanitize an error for safe display to users */ static sanitizeError(error: any, requestId?: string): SanitizedError; /** * Get a safe, user-friendly error message */ private static getSafeErrorMessage; /** * Sanitize error messages to remove sensitive information */ private static sanitizeErrorMessage; /** * Create a user-friendly error response */ static createErrorResponse(error: any, requestId?: string): { success: false; error: SanitizedError; }; /** * Wrap an async function with error handling */ static wrapAsync Promise>(fn: T, context?: string): T; } //# sourceMappingURL=errorHandler.d.ts.map