fix(announcements): no error toast on failed ack, retry transient failures once - #1383
Merged
philmerrell merged 2 commits intoSep 30, 2026
Merged
Conversation
…ement requests The ack POST and feed GET already swallow their own errors by design (fail-open dismissal), but the global error interceptor still toasted them. On mobile, a dropped ack (status 0) surfaced as "An error occurred. Please try again." for something the user cannot act on. Opt both requests out via SUPPRESS_ERROR_TOAST, as NotificationsService already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0127ERDpxwL2nzDEWZU4qPss
A dropped ack (status 0 on a flaky mobile connection, or a 502/503/504 from the gateway) was lost silently, so a requires-ack announcement resurfaced on the next load. Retry once after 1s. The endpoint is idempotent and monotonic, so a duplicate that did land is a no-op. 4xx and other errors are not retried. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0127ERDpxwL2nzDEWZU4qPss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Acknowledging an announcement on mobile Safari showed a global error toast:
Status 0 means the request never completed (a mobile network drop).
AnnouncementsService.ackalready fails open and swallows its own errors by design (§D7), but the globalerrorInterceptorstill toasted every failed request, so the user saw an error they could not act on. The ack was also lost, so arequires_ackannouncement would come back on the next load.Changes
SUPPRESS_ERROR_TOAST, the same approachNotificationsServiceuses. Both already handle their own failures quietly.The local hide still happens immediately, and the retry runs in the background.
Tests
SUPPRESS_ERROR_TOAST.ng testfor the announcement service, modal, banner and topnav specs: 102 passed.tsc -p tsconfig.app.json --noEmitis clean.🤖 Generated with Claude Code
https://claude.ai/code/session_0127ERDpxwL2nzDEWZU4qPss
Generated by Claude Code