Files
2025-10-23 18:35:50 +02:00

14 lines
380 B
Python

import logging
logger = logging.getLogger(__name__)
class ErrorHandler:
@staticmethod
def handle_communication_error(error: Exception, context: str = ""):
"""
Handle communication errors with proper logging
"""
error_msg = f"Communication error in {context}: {str(error)}"
logger.error(error_msg)
return error_msg