fix: wrap revalidatePath in try-catch to prevent save 500, add --no-cache to deploy script
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m33s

This commit is contained in:
Antigravity
2026-05-09 20:43:11 +00:00
parent 4730ab6117
commit 5a6ec4808f
2 changed files with 4 additions and 5 deletions

View File

@@ -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) {

View File

@@ -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