Thrown when policy configuration is invalid or contains an unsupported mode.
Fail-stop: invalid policy must surface immediately, never silently degrade.
Carries optional structured details so a logging boundary can emit
diagnostics (e.g. { received, allowed }) WITHOUT parsing the message string.
The error stays a pure value — it performs no I/O and no logging itself.
Thrown when policy configuration is invalid or contains an unsupported mode.
Fail-stop: invalid policy must surface immediately, never silently degrade.
Carries optional structured
detailsso a logging boundary can emit diagnostics (e.g.{ received, allowed }) WITHOUT parsing the message string. The error stays a pure value — it performs no I/O and no logging itself.