From 5a6ec4808fe084d49646c107f95692059c1dcc46 Mon Sep 17 00:00:00 2001 From: Antigravity Date: Sat, 9 May 2026 20:43:11 +0000 Subject: [PATCH] fix: wrap revalidatePath in try-catch to prevent save 500, add --no-cache to deploy script --- memento-note/app/actions/notes.ts | 5 ++--- memento-note/deploy.sh | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/memento-note/app/actions/notes.ts b/memento-note/app/actions/notes.ts index 36cd9c8..2feacc8 100644 --- a/memento-note/app/actions/notes.ts +++ b/memento-note/app/actions/notes.ts @@ -913,9 +913,8 @@ export async function updateNote(id: string, data: { console.log('[updateNote] Structural check — data fields:', Object.keys(data), '| isStructural:', isStructuralChange) if (!options?.skipRevalidation) { - // Always revalidate note individual page on content changes so UI reflects saved data - revalidatePath(`/note/${id}`) - revalidatePath('/') + try { revalidatePath(`/note/${id}`) } catch {} + try { revalidatePath('/') } catch {} } if (isStructuralChange) { diff --git a/memento-note/deploy.sh b/memento-note/deploy.sh index 8080f89..fdcf3ee 100644 --- a/memento-note/deploy.sh +++ b/memento-note/deploy.sh @@ -103,8 +103,8 @@ case $COMMAND in echo "🔄 Updating application..." echo "Pulling latest changes..." git pull - echo "Rebuilding..." - docker compose build + echo "Rebuilding (no cache)..." + docker compose build --no-cache echo "Restarting..." docker compose down docker compose up -d