pub enum FlowError {
AlreadyExists(String),
NotFound(String),
InvalidArgument(String),
ScopeStackEmpty,
GuardrailRejected(String),
Internal(String),
}Expand description
The error type for all NeMo Flow runtime operations.
Each variant represents a distinct failure mode that callers can match on to determine the appropriate recovery strategy.
Variants§
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)
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)
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
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)
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)
An internal runtime error (e.g., lock poisoning).
Trait Implementations§
Source§impl Error for FlowError
impl Error for FlowError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<FlowError> for AtofExporterError
impl From<FlowError> for AtofExporterError
Source§impl From<FlowError> for OpenInferenceError
impl From<FlowError> for OpenInferenceError
Auto Trait Implementations§
impl Freeze for FlowError
impl RefUnwindSafe for FlowError
impl Send for FlowError
impl Sync for FlowError
impl Unpin for FlowError
impl UnsafeUnpin for FlowError
impl UnwindSafe for FlowError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.