nat.plugins.security.middleware.guardrails.exceptions#
Exceptions raised by the NeMo Guardrails middleware.
Exceptions#
Raised by |
Module Contents#
- exception PostInvokeBlockedError(message: str)#
Bases:
RuntimeErrorRaised by
on_post_invoke_blockedwhen a post_invoke rail blocks the function output.Carries the rail’s message so callers can surface it or re-raise as appropriate. Override
GuardrailsMiddleware.on_post_invoke_blockedto return a value instead.Initialize self. See help(type(self)) for accurate signature.