Skip to content

fix(announcements): no error toast on failed ack, retry transient failures once - #1383

Merged
philmerrell merged 2 commits into
developfrom
claude/mobile-announcement-ack-error-efte27
Sep 30, 2026
Merged

philmerrell merged 2 commits into
developfrom
claude/mobile-announcement-ack-error-efte27

Conversation

@philmerrell

Copy link
Copy Markdown
Contributor

Problem

Acknowledging an announcement on mobile Safari showed a global error toast:

An error occurred. Please try again.
Http failure response for /api/announcements/{id}/ack: 0 Unknown Error

Status 0 means the request never completed (a mobile network drop). AnnouncementsService.ack already fails open and swallows its own errors by design (§D7), but the global errorInterceptor still toasted every failed request, so the user saw an error they could not act on. The ack was also lost, so a requires_ack announcement would come back on the next load.

Changes

  • No toast: the ack POST and the feed GET now set SUPPRESS_ERROR_TOAST, the same approach NotificationsService uses. Both already handle their own failures quietly.
  • One retry: an ack that fails with status 0 or a gateway 502/503/504 is sent once more after 1s. The endpoint is idempotent and monotonic (§D2), so a duplicate that did land is a no-op. 4xx and plain 500 are not retried.

The local hide still happens immediately, and the retry runs in the background.

Tests

  • Both requests set SUPPRESS_ERROR_TOAST.
  • Retry behaviour: a status-0 drop is retried after the delay and succeeds, a 503 is retried, it gives up after one retry, and a 404 is not retried.
  • ng test for the announcement service, modal, banner and topnav specs: 102 passed. tsc -p tsconfig.app.json --noEmit is clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_0127ERDpxwL2nzDEWZU4qPss


Generated by Claude Code

…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
@philmerrell
philmerrell merged commit d476da9 into develop Sep 30, 2026
7 checks passed
@philmerrell
philmerrell deleted the claude/mobile-announcement-ack-error-efte27 branch September 30, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants