bookmarks: don't fabricate a local save when the server rejects it
All checks were successful
PR build (required check) / changes (pull_request) Successful in 6s
secrets-guard / encrypted (pull_request) Successful in 5s
PR build (required check) / build-backend (pull_request) Has been skipped
shell-lint / shellcheck (pull_request) Successful in 9s
PR build (required check) / validate-observability (pull_request) Has been skipped
PR build (required check) / build-frontend (pull_request) Successful in 47s
PR build (required check) / gate (pull_request) Successful in 2s

This commit is contained in:
emi 2026-07-26 18:48:34 +00:00
parent 41cf11afad
commit 88403320f1

View file

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