"""Typed exception tree for mgf-cloud-provision (EH-01/EH-02).

Extends the federation's canonical bases in :mod:`mgf.common.exceptions` so a
consumer can catch `mgf.common.exceptions.AppError`-family errors uniformly. A
bad spec is a config problem; a failed converge is an operation problem.
"""

from __future__ import annotations

from mgf.common.exceptions import ConfigError, OperationError

__all__ = ["ProvisionError", "SpecError"]


class ProvisionError(OperationError):
    """A provisioning operation (plan/apply/destroy) could not be completed."""


class SpecError(ConfigError):
    """A ``ServiceSpec`` is malformed — bad TOML, missing/!typed field, etc."""
