#[non_exhaustive]pub enum UserErrorCategory {
WorkflowDependency,
MissingContext,
NotFound,
Duplicate,
Validation,
Technical,
}Expand description
User-facing error categories for conversation flow control.
When a tool execution fails, this category helps the LLM understand how to respond to the user and what actions might help.
§Example
use multi_llm::{ToolResult, error::UserErrorCategory};
// User needs to complete a prerequisite first
let result = ToolResult {
tool_call_id: "call_123".to_string(),
content: "Please log in first".to_string(),
is_error: true,
error_category: Some(UserErrorCategory::WorkflowDependency),
};Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
WorkflowDependency
User needs to complete a prerequisite action.
Example: “You need to log in before accessing your profile.”
MissingContext
Request is missing required context/parameters.
Example: “Please specify which city you want weather for.”
NotFound
Requested item/resource not found.
Example: “I couldn’t find a user with that email address.”
Duplicate
Attempting to create something that already exists.
Example: “An account with that email already exists.”
Validation
Input validation failed.
Example: “That doesn’t look like a valid email address.”
Technical
Technical/system error - don’t expose details to user.
Example: “Something went wrong. Please try again later.”
Trait Implementations§
Source§impl Clone for UserErrorCategory
impl Clone for UserErrorCategory
Source§fn clone(&self) -> UserErrorCategory
fn clone(&self) -> UserErrorCategory
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UserErrorCategory
impl Debug for UserErrorCategory
Source§impl<'de> Deserialize<'de> for UserErrorCategory
impl<'de> Deserialize<'de> for UserErrorCategory
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for UserErrorCategory
impl PartialEq for UserErrorCategory
Source§impl Serialize for UserErrorCategory
impl Serialize for UserErrorCategory
impl Copy for UserErrorCategory
impl Eq for UserErrorCategory
impl StructuralPartialEq for UserErrorCategory
Auto Trait Implementations§
impl Freeze for UserErrorCategory
impl RefUnwindSafe for UserErrorCategory
impl Send for UserErrorCategory
impl Sync for UserErrorCategory
impl Unpin for UserErrorCategory
impl UnwindSafe for UserErrorCategory
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.