"""Create recovery_planner
Generated by Phi-Octopus Eden
2025-11-07 05:12:53.669088
"""

```python
from typing import Dict, Any

class RecoveryPlanner:
    """
    A class designed to handle limited error recovery in a system.
    
    Attributes:
        errors (Dict[str, str]): Dictionary mapping of error codes to their descriptions.
        actions (Dict[str, callable]): Dictionary of actions for handling specific errors.
        
    Methods:
        __init__(self, errors: Dict[str, str], actions: Dict[str, callable]):
            Initializes the RecoveryPlanner with a set of predefined errors and actions.
            
        handle_error(self, error_code: str) -> None:
            Handles an error based on the provided error code and available recovery actions.
    """
    
    def __init__(self, errors: Dict[str, str], actions: Dict[str, callable]):
        self.errors = errors
        self.actions = actions
    
    def handle_error(self, error_code: str) -> None:
        """
        Attempts to recover from the given error code by executing a corresponding action.
        
        Parameters:
            error_code (str): The code representing the specific error that occurred.
            
        Raises:
            KeyError: If the provided error code is not found in the errors dictionary.
            TypeError: If the associated action for the error is not callable.
        """
        if error_code not in self.errors:
            raise KeyError(f"Error code {error_code} not recognized.")
        
        action = self.actions.get(error_code)
        if action is None or not callable(action):
            raise TypeError(f"No valid action found for error code {error_code}.")
        
        print(f"Handling error: {self.errors[error_code]}")
        try:
            action()
        except Exception as e:
            print(f"Action failed with exception: {e}")

# Example usage
def recover_from_network_error():
    print("Network recovery in progress...")

def recover_from_database_error():
    print("Database backup loaded and applied.")

errors = {
    "network": "Connection loss detected",
    "database": "Corrupted database file"
}

actions = {
    "network": recover_from_network_error,
    "database": recover_from_database_error
}

recovery_planner = RecoveryPlanner(errors, actions)
recovery_planner.handle_error("network")
recovery_planner.handle_error("database")
```