chore: lowercase all error messages and add # Errors doc sections

- Fix err-lowercase-msg: normalize all #[error(...)] display strings to
  lowercase (AppError, FileError, ApiErr) and update affected tests
- Fix err-doc-errors: add # Errors sections to 25+ fallible public
  functions across db.rs, store.rs, embedding.rs, indexes.rs,
  ingestion_task.rs, and ingest_limits.rs
This commit is contained in:
Per Stark
2026-05-27 14:59:48 +02:00
parent e63498ecee
commit 9ccf8dde25
9 changed files with 221 additions and 54 deletions
+15 -15
View File
@@ -8,34 +8,34 @@ use crate::storage::types::file_info::FileError;
#[allow(clippy::module_name_repetitions)]
#[derive(Error, Debug)]
pub enum AppError {
#[error("Database error: {0}")]
#[error("database error: {0}")]
Database(#[from] surrealdb::Error),
#[error("OpenAI error: {0}")]
#[error("openai error: {0}")]
OpenAI(#[from] OpenAIError),
#[error("File error: {0}")]
#[error("file error: {0}")]
File(#[from] FileError),
#[error("Not found: {0}")]
#[error("not found: {0}")]
NotFound(String),
#[error("Validation error: {0}")]
#[error("validation error: {0}")]
Validation(String),
#[error("Authorization error: {0}")]
#[error("authorization error: {0}")]
Auth(String),
#[error("LLM parsing error: {0}")]
#[error("llm parsing error: {0}")]
LLMParsing(String),
#[error("Task join error: {0}")]
#[error("task join error: {0}")]
Join(#[from] JoinError),
#[error("Graph mapper error: {0}")]
#[error("graph mapper error: {0}")]
GraphMapper(String),
#[error("IO error: {0}")]
#[error("io error: {0}")]
Io(#[from] std::io::Error),
#[error("Reqwest error: {0}")]
#[error("reqwest error: {0}")]
Reqwest(#[from] reqwest::Error),
#[error("Storage error: {0}")]
#[error("storage error: {0}")]
Storage(#[from] object_store::Error),
#[error("Ingestion Processing error: {0}")]
#[error("ingestion processing error: {0}")]
Processing(String),
#[error("DOM smoothie error: {0}")]
#[error("dom smoothie error: {0}")]
DomSmoothie(#[from] dom_smoothie::ReadabilityError),
#[error("Internal service error: {0}")]
#[error("internal service error: {0}")]
InternalError(String),
}