nemoguardrails.exceptions
Module Contents
Classes
Data
API
Bases: ValueError
Base class for Guardrails Configuration validation errors.
Bases: ConfigurationError
Raised when a guardrail configuration’s model is invalid.
Bases: ValueError
Raised when a caller-supplied state argument is not valid public input.
The serialized Colang 2.0 runtime State carries trusted control-plane fields
(flow_configs, rails_config, in-flight flow execution) and must not come
from an untrusted caller. Stateful 2.x execution uses process_events_async,
which keeps a live State object in the trusted Python process.
Bases: LLMClientError
Bases: LLMClientError
Bases: Exception
A wrapper around the LLM call invocation exception.
This is used to propagate the exception out of the generate_async call. The default behavior is to
catch it and return an “Internal server error.” message.
Bases: Exception
Base class for LLM client errors.
status_code holds the HTTP response status when one was received,
or 0 when no response arrived (client-side timeout or network
error). Callers should branch on exception class rather than
status_code to distinguish HTTP vs network failures, the type
hierarchy is the authoritative discriminator.
Bases: LLMClientError
Bases: LLMBadRequestError
Bases: LLMClientError
Bases: LLMClientError
Bases: LLMClientError
Bases: LLMClientError
Bases: LLMBadRequestError
Bases: InvalidRailsConfigurationError
Raised when streaming is requested but not supported by the configuration.