refactor: streamline error handling and attachment processing in message capture

This commit is contained in:
MythEclipse
2026-05-18 23:46:51 +07:00
parent b2cd9f672c
commit 6339d741a9
4 changed files with 52 additions and 51 deletions
-13
View File
@@ -97,19 +97,6 @@ async function processAnalysisRequest({
const errorMessage = error instanceof Error ? error.message : String(error);
const rows: MessageRecord[] = [];
for (const msg of messages) {
const row = await updateMessageAIAnalysis(msg.id, {
status: "error",
flags: null,
score: null,
raw: null,
analysis: null,
analyzedAt: Date.now(),
error: errorMessage,
});
if (row) rows.push(row);
}
return { ok: false, conversationKey, rows, error: errorMessage };
}
}