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
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:
parent
41cf11afad
commit
88403320f1
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue