from typing import Dict


def format_error(category: str, msg: str) -> Dict[str, dict]:
    """Format an error in a standard way
    Args:
        category: the type of error
        msg: the message with the error
    """
    return {"error": {"type": category, "details": msg}}