project summaries addition

This commit is contained in:
Storme-bit
2026-04-26 21:02:42 -07:00
parent fcaf0e651f
commit 855de6d0af
7 changed files with 190 additions and 36 deletions

View File

@@ -252,8 +252,7 @@ app.post('/projects/:id/summarize', async (req, res) => {
const summary = await generateAndStoreProjectSummary(Number(req.params.id));
res.status(201).json(summary);
} catch (err) {
// Distinguish "no data" from actual errors — both are non-500 from the client's perspective
if (err.message.includes('No session summaries')) {
if (err.message.includes('No session summaries or episodes')) {
return res.status(422).json({ error: err.message });
}
res.status(500).json({ error: err.message });