~yujiri/sufec#22: 
Handle errors gracefully

Like failing to send, failing to connect to homeserver. Not sure how the TUI client should handle these.

Status
REPORTED
Submitter
~yujiri
Assigned to
No-one
Submitted
3 years ago
Updated
2 years ago
Labels
GTK android priority

~yujiri 2 years ago

If a message fails to send, it should be stored and retried until it goes through. that'll be complex to implement.

~yujiri referenced this from #24 2 years ago

~yujiri 2 years ago

also, TOFU-related failures should show a popup or something

~yujiri 2 years ago

The terminal client now handles server key changes and lets the user approve them! This is wonderful. The only other thing it needs is resending failed messages.

~yujiri 2 years ago

Started looking into this, thinking that maybe messages should go back to having, instead of all_verified bool, a status field with 3 states: sending, sent, and verified.

~yujiri 2 years ago

Update: the terminal client now saves outgoing messages and removes them when they send successfully or fail with RecipientNotFound. it still needs:

  • Retry ones that fail

  • Show some UI indication that it hasn't sent yet

  • Show some UI indication when it fails with RecipientNotFound. How should this work? Maybe messages' status field has 4 states: sending, sent, verified, and failed. And if you select the message you can get info on who it failed to send to and who verified it.

    Or maybe we want to be able to show that it failed to send to one person while it's still trying to others. So maybe we need multiple status fields: whether it's verified by everyone, whether it's still trying to send to at least one person, and whether it's permanently failed to send to at least one person.

  • What should happen if a message keeps failing to send? Should it ever give up? Should the user be able to cancel it? What if the homeserver was entered wrong, so it'll never succeed but also never get a RecipientNotFound?

~yujiri 2 years ago

I'm getting ahead of myself thinking about this status field. First I should deal with retrying and indicating perma errors.

~yujiri 2 years ago

Hmm... maybe it should just do a user-controlled resend like element does? Where if it fails once, you have to press something to make it retry?

~yujiri 2 years ago

Massive progress! I implemented a take on this in the sufec term client. I would remove it from the tag list, but there's one design flaw: messages that didn't get to send but also didn't fail (app closed before they sent) are included in the resend command, but there's no visible indication of which ones those are. History entries show if they've failed, but that's it.

~yujiri 2 years ago

This is all done in the term client!

Register here or Log in to comment, or comment via email.