Class GuardrailViolationException

All Implemented Interfaces:
Serializable

public class GuardrailViolationException extends RuntimeException
Thrown by InputGuardrailEnforcer or OutputGuardrailEnforcer when an action's declared guardrail is breached and the onFailure policy requires aborting the action.

When enforcement runs through ActionExecutor, it is wrapped into an ActionExecutionException of category VALIDATION. Direct callers of other enforcement boundaries, including ToolMethodDispatcher, receive this exception as-is.

GuardrailViolationException.Stage distinguishes input-side from output-side failures for telemetry / logging; parameterName() (input) or "<output>" (output) identifies the offending payload. Input enforcement omits a parameter name when the name itself is rejected, so diagnostics never copy a PII-shaped key.

Since:
0.5.4 (issue #171, Phase 1)
See Also: