Skip to navigation

Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.

pub enum FlowError {
AlreadyExists(String),
NotFound(String),
InvalidArgument(String),
ScopeStackEmpty,
GuardrailRejected(String),
Upstream(UpstreamFailure),
Internal(String),
CallbackException {
message: String,
exception_type: String,
source: Option<Arc<dyn Error + Sync + Send>>,
},
}

Referenced types: String, UpstreamFailure, Option, Arc, Error, Sync, Send

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)

Referenced types: 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)

Referenced types: 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)

Referenced types: 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)

Referenced types: 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).

Upstream(UpstreamFailure)

Upstream(UpstreamFailure)

Referenced types: UpstreamFailure

Structured upstream provider failure from retry-aware gateway dispatch.

Internal(String)

Internal(String)

Referenced types: String

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

CallbackException

CallbackException

An application failure returned by Rust code or raised by a binding callback.

Use FlowError::application to construct this variant without a source.

Fields

message: String

Plain application message, without an exception class or Relay prefix.

exception_type: String

Application error type or original language exception class name.

source: Option<Arc<dyn Error + Sync + Send>>

Original source error, when available.

Formatting with {:?} or formatting the value returned by Error::source() may run binding code, like acquiring the GIL. Avoid on a thread that a GIL-holding thread is blocked waiting on.

Implementations

impl FlowError

impl FlowError

Referenced types: FlowError

application

pub fn application(
message: impl Into<String>,
exception_type: impl Into<String>,
) -> FlowError

Referenced types: Into, String, FlowError

Construct an application failure for a managed tool, LLM, or middleware callback.

The message becomes the trace status description verbatim. The error type is recorded separately as exception.type; error.type is the bounded classification application_error. Use Internal only for runtime faults.

Trait Implementations

impl Clone for FlowError

impl Clone for FlowError

Referenced types: Clone, FlowError

clone

fn clone(&self) -> FlowError

Referenced types: clone, FlowError

clone_from

fn clone_from(&mut self, source: &Self)

Referenced types: clone_from

impl Debug for FlowError

impl Debug for FlowError

Referenced types: Debug, FlowError

fmt

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

Referenced types: fmt, Formatter, Result, (), Error

impl Display for FlowError

impl Display for FlowError

Referenced types: Display, FlowError

fmt

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

Referenced types: fmt, Formatter, Result, (), Error

impl Error for FlowError

impl Error for FlowError

Referenced types: Error, FlowError

source

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

Referenced types: source, Option, Error

description

fn description(&self) -> &str

Referenced types: description, str

cause

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

Referenced types: cause, Option, Error

provide

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

Referenced types: provide, Request

impl From<FlowError> for AtofExporterError

impl From<FlowError> for AtofExporterError

Referenced types: From, FlowError, AtofExporterError

from

fn from(source: FlowError) -> AtofExporterError

Referenced types: from, FlowError, AtofExporterError

impl From<FlowError> for OpenTelemetryError

impl From<FlowError> for OpenTelemetryError

Referenced types: From, FlowError, OpenTelemetryError

from

fn from(source: FlowError) -> OpenTelemetryError

Referenced types: from, FlowError, OpenTelemetryError