pub enum CoreError {
Tool(String),
Memory(String),
Governance(String),
RateLimited(String),
CircuitBreaker(String),
InvalidArgs(String),
NotFound(String),
Polyglot(String),
Io(Error),
Serde(Error),
Internal(String),
}Expand description
Core error type covering all WhiteMagic failure modes.
Variants§
Tool(String)
Tool execution failed
Memory(String)
Memory operation failed
Governance(String)
Governance rule violation
RateLimited(String)
Rate limit exceeded
CircuitBreaker(String)
Circuit breaker open
InvalidArgs(String)
Invalid arguments
NotFound(String)
Resource not found
Polyglot(String)
Polyglot bridge error
Io(Error)
I/O error
Serde(Error)
Serialization error
Internal(String)
Internal error (should not happen in normal operation)
Implementations§
Source§impl CoreError
impl CoreError
Sourcepub const fn is_retryable(&self) -> bool
pub const fn is_retryable(&self) -> bool
Whether this error is retryable.
Sourcepub const fn is_governance(&self) -> bool
pub const fn is_governance(&self) -> bool
Whether this error indicates a governance violation.
Sourcepub const fn counts_as_breaker_failure(&self) -> bool
pub const fn counts_as_breaker_failure(&self) -> bool
Whether this error should count against a tool’s circuit breaker.
Caller-caused failures (invalid arguments, governance refusals, not-found lookups, rate limiting) say nothing about backend health. Counting them let a handful of bad requests trip a breaker and block VALID requests that followed (2026-09-15 audit: five invalid-galaxy creates fast-failed the next correct call).
Trait Implementations§
Source§impl Error for CoreError
impl Error for CoreError
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()