from __future__ import annotations

from typing import Any, Dict, Optional


class SettlementError(Exception):
    def __init__(self, code: str, detail: Optional[Dict[str, Any]] = None) -> None:
        self.code = code
        self.detail = detail or {}
        super().__init__(code)
