"""The shared service-layer structured error (04-architecture: every
route speaks {error_code, summary, detail}). Services raise this;
routers translate to the ApiError HTTPException. The imports pipeline
predates it with its own identically-shaped ImportsError — both funnel
into the same wire triple."""

from __future__ import annotations


class ServiceError(Exception):
    def __init__(self, status: int, code: str, summary: str, detail: str = ""):
        super().__init__(summary)
        self.status = status
        self.code = code
        self.summary = summary
        self.detail = detail
