mirror of
https://github.com/block/buzz.git
synced 2026-11-24 10:12:19 +00:00
## Summary
When adding members fails, the Add Members sheet shows each member's
error. The text came from `error.toString().replaceFirst('Exception: ',
'')`, which removes the first `Exception: ` anywhere in the text, not
just a leading one. So a relay ACK timeout read "TimeoutEvent <id> not
acknowledged within …" instead of "TimeoutException: Event <id> not
acknowledged within …".
Now a plain `Exception: ` prefix is removed only where it starts the
text or follows a wrapping error's `: `. A relay rejection still shows
as "restricted: …", and an add lost when the app goes to the background
reads "Connection lost before the relay acknowledged the event: App
moved to background" without a nested "Exception: ". Named types such as
`TimeoutException` keep their whole name.
## Validation
- New row in `channel_management_provider_test.dart`: `addMembers` with
one member whose add times out, one the relay rejects and one lost when
the app goes to the background. It checks each text in the
`AddMembersException`.
No screenshots: the change only affects the error text after a failed
add, which can't be triggered on demand against a real relay.
Full-app run on an iOS simulator (signed in, healthy relay): cold start
and session restore, channel list, opening channels and a DM with
history scrolling, channel details and the members list, Add Members
(picker, search, cancel), Settings, and background then foreground. All
passed with no new errors in the device log.
---------
Signed-off-by: Tom Brow <tomb@block.xyz>
Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@localhost>