Enum Flow Error

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.

pub enum FlowError {
    AlreadyExists(String),
    NotFound(String),
    InvalidArgument(String),
    ScopeStackEmpty,
    GuardrailRejected(String),
    Internal(String),
}

The error type for all NeMo Relay runtime operations.

Each variant represents a distinct failure mode that callers can match on to determine the appropriate recovery strategy.

Variants

AlreadyExists(String)

AlreadyExists(String)

A resource with the given name is already registered.

Returned when attempting to register a guardrail, intercept, or subscriber with a name that is already in use. Deregister the existing entry first, or choose a different name.

NotFound(String)

NotFound(String)

The requested resource was not found.

Returned when attempting to remove a scope handle by UUID that does not exist in the scope stack, or when looking up a non-existent entity.

InvalidArgument(String)

InvalidArgument(String)

A function argument was invalid for the requested operation.

Returned when a provided value is well-formed but violates an API precondition, such as attempting to pop a scope that is not currently at the top of the stack.

ScopeStackEmpty

ScopeStackEmpty

The scope stack is empty.

This should not occur under normal operation because the root scope is always present and cannot be removed.

GuardrailRejected(String)

GuardrailRejected(String)

A conditional execution guardrail rejected the operation.

The contained string is the rejection reason provided by the guardrail. This is returned during tool_call_execute or llm_call_execute when a conditional guardrail returns Some(reason).

Internal(String)

Internal(String)

An internal runtime error (e.g., lock poisoning).

Trait Implementations

impl Debug for FlowError

impl Debug for FlowError

fmt

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Display for FlowError

impl Display for FlowError

fmt

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

impl Error for FlowError

impl Error for FlowError

source

fn source(&self) -> Option<&(dyn Error + 'static)>

description

fn description(&self) -> &str

cause

fn cause(&self) -> Option<&dyn Error>

provide

fn provide<'a>(&'a self, request: &mut Request<'a>)

impl From<FlowError> for AtofExporterError

impl From<FlowError> for AtofExporterError

from

fn from(source: FlowError) -> Self

impl From<FlowError> for OpenInferenceError

impl From<FlowError> for OpenInferenceError

from

fn from(source: FlowError) -> Self

impl From<FlowError> for OpenTelemetryError

impl From<FlowError> for OpenTelemetryError

from

fn from(source: FlowError) -> Self