fix(errors): surface previously-silent async failures (DP1/DP4/DP6)

Several fire-and-forget promises failed silently:
- RoomInput slash-command exe() rejections reset the editor as if they
  succeeded; now caught and shown via an error toast.
- Favourite / low-priority room-tag toggles (setRoomTag/deleteRoomTag)
  swallowed rejections; now surfaced via the same error toast.
- Call-decline sendEvent(RTCDecline) was uncaught; now logged best-effort
  while the local UI still dismisses.

Adds a shared createErrorToast builder mirroring createDownloadToast.
/kick and /ban route through rateLimitedActions, whose to() helper
swallows non-429 errors, so those two can still resolve on failure — noted
in code; the top-level exe() catch covers everything that does reject.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-07 22:29:39 -04:00
co-authored by Claude Opus 4.8
parent 2614e6b92d
commit 8eb961b682
5 changed files with 66 additions and 10 deletions
+5
View File
@@ -544,11 +544,16 @@ function IncomingCallListener({ callEmbed, joined }: IncomingCallListenerProps)
const handleReject = useCallback(
(room: Room, eventId: string) => {
// Best-effort: the local UI dismisses regardless (below), but a failed
// decline used to reject uncaught. Log it instead of surfacing — the caller
// will time the call out on their side even if our decline never lands.
mx.sendEvent(room.roomId, EventType.RTCDecline, {
'm.relates_to': {
rel_type: RelationType.Reference,
event_id: eventId,
},
}).catch((err) => {
console.error('Failed to send call decline:', err);
});
setCallInfo(undefined);
},