#[non_exhaustive]pub enum LlmBackendError {
NonZeroExit {
exit_code: Option<i32>,
signal: Option<i32>,
stdout_tail: String,
stderr_tail: String,
binary: String,
hint: String,
},
SpawnFailed {
binary: String,
source: String,
},
Timeout {
secs: u64,
binary: String,
},
NoBackendsAvailable,
}Expand description
Structured error for an LLM subprocess invocation that failed.
Each variant carries the information needed to diagnose the failure WITHOUT re-running the subprocess: the binary, the exit code, and a truncated tail of stdout/stderr so the operator can see WHY the call failed (rate limit, OAuth, OOM, segfault, missing binary, …).
Distinct from AppError::Embedding(String) (the legacy v1.0.81
shape) so the call sites can match on the failure category
programmatically instead of parsing the message string. The
Display impl preserves the legacy string format for back-compat
with tracing consumers and the i18n layer.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NonZeroExit
Subprocess exited with a non-zero status. The hint is
looked up from EXIT_CODE_HINTS and tells the operator
what to do next (re-auth, reduce parallelism, report upstream,
etc.).
Fields
signal: Option<i32>Unix signal that killed the process (2 = SIGINT, 15 = SIGTERM,
9 = SIGKILL). None when the process exited normally.
hint: StringHuman-readable diagnostic from EXIT_CODE_HINTS.
SpawnFailed
Subprocess could not be spawned at all (binary missing, no exec
permission, or the OS refused to fork). Distinct from
NonZeroExit so call sites can branch on “never started” vs
“started and crashed”.
Fields
Timeout
Subprocess exceeded the per-call timeout (default 300s,
override via SQLITE_GRAPHRAG_EMBED_TIMEOUT_SECS).
Fields
NoBackendsAvailable
All backends in the fallback chain failed AND no fallback was
available. The call site should honour --skip-embedding-on-failure
to write a pending_embeddings row instead of propagating this.
Implementations§
Trait Implementations§
Source§impl Clone for LlmBackendError
impl Clone for LlmBackendError
Source§fn clone(&self) -> LlmBackendError
fn clone(&self) -> LlmBackendError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LlmBackendError
impl Debug for LlmBackendError
Source§impl Display for LlmBackendError
impl Display for LlmBackendError
impl Eq for LlmBackendError
Source§impl Error for LlmBackendError
impl Error for LlmBackendError
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 PartialEq for LlmBackendError
impl PartialEq for LlmBackendError
Source§fn eq(&self, other: &LlmBackendError) -> bool
fn eq(&self, other: &LlmBackendError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LlmBackendError
Auto Trait Implementations§
impl Freeze for LlmBackendError
impl RefUnwindSafe for LlmBackendError
impl Send for LlmBackendError
impl Sync for LlmBackendError
impl Unpin for LlmBackendError
impl UnsafeUnpin for LlmBackendError
impl UnwindSafe for LlmBackendError
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§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.impl<T> ErasedDestructor for Twhere
T: 'static,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§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.