Skip to main content

zeph_memory/
error.rs

1// SPDX-FileCopyrightText: 2026 Andrei G <bug-ops>
2// SPDX-License-Identifier: MIT OR Apache-2.0
3
4#[derive(Debug, thiserror::Error)]
5pub enum MemoryError {
6    #[error("database error: {0}")]
7    Sqlite(#[from] sqlx::Error),
8
9    #[error("Qdrant error: {0}")]
10    Qdrant(#[from] Box<qdrant_client::QdrantError>),
11
12    #[error("vector store error: {0}")]
13    VectorStore(#[from] crate::vector_store::VectorStoreError),
14
15    #[error("migration failed: {0}")]
16    Migration(#[from] sqlx::migrate::MigrateError),
17
18    #[error("LLM error: {0}")]
19    Llm(#[from] zeph_llm::LlmError),
20
21    #[error("JSON error: {0}")]
22    Json(#[from] serde_json::Error),
23
24    #[error("integer conversion: {0}")]
25    IntConversion(#[from] std::num::TryFromIntError),
26
27    #[error("snapshot error: {0}")]
28    Snapshot(String),
29
30    #[error("I/O error: {0}")]
31    Io(#[from] std::io::Error),
32
33    #[error("{0}")]
34    Other(String),
35}