From 88403320f1706dfff6b520e0ddb9017b5ac9c571 Mon Sep 17 00:00:00 2001 From: emi Date: Sun, 26 Jul 2026 18:48:34 +0000 Subject: [PATCH] bookmarks: don't fabricate a local save when the server rejects it --- frontend/static/bookmarks-ui.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/static/bookmarks-ui.js b/frontend/static/bookmarks-ui.js index 82877ed..2f3b6a7 100644 --- a/frontend/static/bookmarks-ui.js +++ b/frontend/static/bookmarks-ui.js @@ -111,6 +111,10 @@ function buildStar() { try { if (existing) await bookmarks.remove(existing.id); else await bookmarks.add(loc.lat, loc.lon, currentLabel()); + } catch (e) { + // A real server rejection (e.g. the per-user cap) — bookmarks.add() no + // longer fakes a local save for this, so say why nothing changed. + alert(e.message || "Couldn't save this location."); } finally { btn.disabled = false; }