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 4579725130
commit 224a7db451
9 changed files with 221 additions and 54 deletions
+9
View File
@@ -6,6 +6,15 @@ pub enum IngestValidationError {
BadRequest(String),
}
/// Validates ingestion input against configured limits.
///
/// Checks file count, content size, context size, and category length.
///
/// # Errors
///
/// Returns `IngestValidationError::BadRequest` if the file count exceeds the maximum.
/// Returns `IngestValidationError::PayloadTooLarge` if content, context, or
/// category exceed their configured byte limits.
pub fn validate_ingest_input(
config: &AppConfig,
content: Option<&str>,