mud_server.services.policy.errors ================================= .. py:module:: mud_server.services.policy.errors .. autoapi-nested-parse:: Error contracts for canonical policy services. This module defines the typed service-layer exception used across policy subsystems. API route adapters rely on this error shape to preserve stable status codes and machine-readable contract codes. Exceptions ---------- .. autoapisummary:: mud_server.services.policy.errors.PolicyServiceError Module Contents --------------- .. py:exception:: PolicyServiceError(*, status_code, code, detail) Bases: :py:obj:`RuntimeError` Typed policy-service error carrying stable HTTP and contract metadata. .. attribute:: status_code HTTP status code expected by API adapters. .. attribute:: code Stable machine-readable error code used by clients/tests. .. attribute:: detail Human-readable description for logs, operators, and UI surfaces. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: status_code .. py:attribute:: code .. py:attribute:: detail .. py:method:: to_response_payload() Return canonical API payload shape for policy errors.