"""Create recovery_planner
Generated by Phi-Octopus Eden
2025-11-05 20:37:02.495657
"""

```python
from typing import Dict, Any


class RecoveryPlanner:
    """
    A class for creating a recovery plan in response to errors.
    
    Attributes:
        error_conditions: A dictionary mapping error conditions to their respective recovery actions.
        
    Methods:
        add_recovery_action(error_condition: str, action: Callable): Adds a new recovery action.
        execute_recovery_plan(error_message: str) -> Any: Executes the appropriate recovery action based on the error message.
    """
    
    def __init__(self):
        self.error_conditions = {}
    
    def add_recovery_action(self, error_condition: str, action: Any) -> None:
        """Add a new recovery action for an error condition."""
        if not callable(action):
            raise ValueError("Action must be a callable function")
        
        self.error_conditions[error_condition] = action
    
    def execute_recovery_plan(self, error_message: str) -> Any:
        """
        Execute the appropriate recovery action based on the error message.
        
        Args:
            error_message (str): The error message indicating the current state of failure.
            
        Returns:
            Any: The result or response from the executed recovery action.
        """
        for condition, action in self.error_conditions.items():
            if condition in error_message:
                return action()
        raise KeyError(f"No recovery plan found for error message: {error_message}")


# Example Usage
def restart_service() -> str:
    """Example action: Restart a service."""
    print("Restarting the service...")
    return "Service has been restarted."

def update_configuration() -> str:
    """Example action: Update configuration settings."""
    print("Updating the system configuration...")
    return "Configuration updated successfully."

# Creating an instance of RecoveryPlanner
recovery_planner = RecoveryPlanner()

# Adding recovery actions
recovery_planner.add_recovery_action("Service error", restart_service)
recovery_planner.add_recovery_action("Configuration error", update_configuration)

try:
    # Simulate some errors
    raise Exception("Service error occurred")
except Exception as e:
    result = recovery_planner.execute_recovery_plan(str(e))
    print(result)
```