mirror of
https://github.com/perstarkse/minne.git
synced 2026-07-01 02:21:34 +02:00
chore: harden common errors, fastembed blocking, and ingest ownership
Run FastEmbed inference on spawn_blocking, propagate Surreal take failures, add AppError::internal and typed ingest/embedding parse errors, and take owned file lists in ingestion payload construction.
This commit is contained in:
@@ -39,3 +39,11 @@ pub enum AppError {
|
||||
#[error("internal service error: {0}")]
|
||||
InternalError(String),
|
||||
}
|
||||
|
||||
impl AppError {
|
||||
/// Builds an [`AppError::InternalError`] from a displayable message.
|
||||
#[must_use]
|
||||
pub fn internal(msg: impl std::fmt::Display) -> Self {
|
||||
Self::InternalError(msg.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user