chore: removed anyhow from apperror for improved error handling

This commit is contained in:
Per Stark
2026-05-27 13:33:02 +02:00
parent 890a4b381d
commit 31d585b59f
7 changed files with 36 additions and 25 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ use std::{
sync::{Arc, OnceLock},
};
use anyhow::Context;
use async_openai::types::{
ChatCompletionRequestSystemMessage, ChatCompletionRequestUserMessage,
CreateChatCompletionRequest, CreateChatCompletionRequestArgs, ResponseFormat,
@@ -269,7 +269,7 @@ impl PipelineServices for DefaultPipelineServices {
.embedding_provider
.embed(&chunk_text)
.await
.context("generating FastEmbed embedding for chunk")?;
.map_err(|e| AppError::InternalError(format!("FastEmbed embedding for chunk failed: {e}")))?;
let chunk_struct = TextChunk::new(
content.get_id().to_string(),
chunk_text,