pub enum ErrorDomain {
Planning,
Reflection,
Action,
System,
}Expand description
High-level error domain for recovery strategy dispatch.
Groups the ToolErrorCategory variants into 4 domains that map to distinct
recovery strategies in the agent loop. Does NOT replace ToolErrorCategory — it
is a companion abstraction for coarse dispatch.
§Examples
use zeph_common::error_taxonomy::ErrorDomain;
assert!(ErrorDomain::System.is_auto_retryable());
assert!(!ErrorDomain::Planning.is_auto_retryable());Variants§
Planning
The agent selected the wrong tool or misunderstood the task.
Recovery: re-plan, pick a different tool or approach.
Categories: ToolNotFound
Reflection
The agent’s output (parameters, types) was malformed.
Recovery: reformat parameters using tool schema, retry once.
Categories: InvalidParameters, TypeMismatch
Action
External action failed due to policy or resource constraints.
Recovery: inform user, suggest alternative, or skip.
Categories: PolicyBlocked, ConfirmationRequired, PermanentFailure, Cancelled
System
Transient infrastructure failure.
Recovery: automatic retry with backoff.
Categories: RateLimited, ServerError, NetworkError, Timeout
Implementations§
Source§impl ErrorDomain
impl ErrorDomain
Sourcepub fn is_auto_retryable(self) -> bool
pub fn is_auto_retryable(self) -> bool
Whether errors in this domain should trigger automatic retry.
Sourcepub fn needs_llm_correction(self) -> bool
pub fn needs_llm_correction(self) -> bool
Whether the LLM should be asked to fix its output.
Trait Implementations§
Source§impl Clone for ErrorDomain
impl Clone for ErrorDomain
Source§fn clone(&self) -> ErrorDomain
fn clone(&self) -> ErrorDomain
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ErrorDomain
impl Debug for ErrorDomain
Source§impl<'de> Deserialize<'de> for ErrorDomain
impl<'de> Deserialize<'de> for ErrorDomain
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ErrorDomain, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ErrorDomain, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Hash for ErrorDomain
impl Hash for ErrorDomain
Source§impl PartialEq for ErrorDomain
impl PartialEq for ErrorDomain
Source§impl Serialize for ErrorDomain
impl Serialize for ErrorDomain
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for ErrorDomain
impl Eq for ErrorDomain
impl StructuralPartialEq for ErrorDomain
Auto Trait Implementations§
impl Freeze for ErrorDomain
impl RefUnwindSafe for ErrorDomain
impl Send for ErrorDomain
impl Sync for ErrorDomain
impl Unpin for ErrorDomain
impl UnsafeUnpin for ErrorDomain
impl UnwindSafe for ErrorDomain
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§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.