Skip to main content

GradatumError

Enum GradatumError 

Source
pub enum GradatumError {
Show 16 variants Validation(ValidationError), Drift(DriftError), Storage(String), Markdown(String), NoteNotFound(NoteId), InvalidStatusTransition { from: NoteStatus, to: NoteStatus, }, SchemaVersionMismatch { expected: SchemaVersion, found: SchemaVersion, }, VaultNotFound(VaultId), VaultOnNfs { path: PathBuf, }, SchemaValidation(ValidationError), SchemaMigration(MigrationError), Io(Error), TomlParse(Error), TomlSerialize(Error), Config(ConfigError), Inference(String),
}
Expand description

Erreur top-level de gradatum-core.

Produite par les couches L0 (core) et retournée aux consommateurs L1+. Chaque variante mappe une couche spécifique de l’architecture.

Variants§

§

Validation(ValidationError)

Erreur de validation d’une valeur entrante.

§

Drift(DriftError)

Drift détecté entre le Markdown sur disque et l’index SQLite.

§

Storage(String)

Erreur de stockage (SQLite, OpenDAL, filesystem).

Les couches de stockage mapent leurs erreurs spécifiques via GradatumError::Storage.

§

Markdown(String)

Erreur de parsing Markdown.

§

NoteNotFound(NoteId)

Note introuvable dans l’index.

§

InvalidStatusTransition

Transition de statut invalide (ne respecte pas la state machine §2.6).

Fields

§from: NoteStatus

Statut source (avant la transition).

§to: NoteStatus

Statut cible (refusé).

§

SchemaVersionMismatch

Mismatch de version de schéma frontmatter.

Fields

§expected: SchemaVersion

Version attendue par le crate courant.

§found: SchemaVersion

Version trouvée dans le frontmatter.

§

VaultNotFound(VaultId)

Vault introuvable dans la configuration.

§

VaultOnNfs

Vault monté sur NFS — non supporté.

Caveat C11 — le vault doit être sur un filesystem local. Détection via nix::sys::statfs::statfs + NFS_SUPER_MAGIC comparison.

Fields

§path: PathBuf

Chemin du vault root dont le statfs a retourné NFS_SUPER_MAGIC.

§

SchemaValidation(ValidationError)

Erreur de validation du payload override contre le schéma registry.

§

SchemaMigration(MigrationError)

Erreur de migration du payload override.

§

Io(Error)

Erreur I/O (lecture/écriture fichier, permissions, etc.).

§

TomlParse(Error)

Erreur de parsing TOML.

§

TomlSerialize(Error)

Erreur de sérialisation TOML.

§

Config(ConfigError)

Erreur de configuration (chargement TOML, validation champs).

§

Inference(String)

Erreur d’inférence (embedding, reranker, modèle LLM).

Variant dédié pour les erreurs d’embedder/reranker. Permet aux handlers (ex: vault_search) de distinguer une panne d’inférence d’une erreur de stockage et de dégrader gracieusement (fallback BM25 au lieu de 500).

La conversion From<EmbedError> est implémentée côté gradatum-embed::error pour respecter les orphan rules.

Mapping HTTP recommandé : 503 Service Unavailable (embedder en panne) — mais les handlers production peuvent préférer un fallback gracieux (200 + BM25 only) via tracing::warn! et un vecteur sémantique vide.

Trait Implementations§

Source§

impl Debug for GradatumError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for GradatumError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for GradatumError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<ConfigError> for GradatumError

Source§

fn from(source: ConfigError) -> Self

Converts to this type from the input type.
Source§

impl From<DriftError> for GradatumError

Source§

fn from(source: DriftError) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for GradatumError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for GradatumError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for GradatumError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<MigrationError> for GradatumError

Source§

fn from(source: MigrationError) -> Self

Converts to this type from the input type.
Source§

impl From<ValidationError> for GradatumError

Source§

fn from(source: ValidationError) -> Self

Converts to this type from the input type.
Source§

impl From<ValidationError> for GradatumError

Source§

fn from(source: ValidationError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V