mirror of
https://github.com/perstarkse/minne.git
synced 2026-03-22 17:40:00 +01:00
37 lines
1.0 KiB
Rust
37 lines
1.0 KiB
Rust
use async_openai::error::OpenAIError;
|
|
use thiserror::Error;
|
|
use tokio::task::JoinError;
|
|
|
|
use crate::storage::types::file_info::FileError;
|
|
|
|
// Core internal errors
|
|
#[derive(Error, Debug)]
|
|
pub enum AppError {
|
|
#[error("Database error: {0}")]
|
|
Database(#[from] surrealdb::Error),
|
|
#[error("OpenAI error: {0}")]
|
|
OpenAI(#[from] OpenAIError),
|
|
#[error("File error: {0}")]
|
|
File(#[from] FileError),
|
|
#[error("Not found: {0}")]
|
|
NotFound(String),
|
|
#[error("Validation error: {0}")]
|
|
Validation(String),
|
|
#[error("Authorization error: {0}")]
|
|
Auth(String),
|
|
#[error("LLM parsing error: {0}")]
|
|
LLMParsing(String),
|
|
#[error("Task join error: {0}")]
|
|
Join(#[from] JoinError),
|
|
#[error("Graph mapper error: {0}")]
|
|
GraphMapper(String),
|
|
#[error("IoError: {0}")]
|
|
Io(#[from] std::io::Error),
|
|
#[error("Reqwest error: {0}")]
|
|
Reqwest(#[from] reqwest::Error),
|
|
#[error("Tiktoken error: {0}")]
|
|
Tiktoken(#[from] anyhow::Error),
|
|
#[error("Ingress Processing error: {0}")]
|
|
Processing(String),
|
|
}
|