Skip to content

handling of core.composeEmail errors #411

@tomholub

Description

@tomholub

It's possible for this to fail for various reasons. For example, try to run this with an invalid public key. It will produce an error, and this should be handled gratiously - by showing a modal alert to the user that there was an error sending message, and what it said. After the taps clicks the modal away, they should still be on the compose screen where they can click send again to retry.

Originally posted by @tomholub in #410 (comment)

    private func encryptMessage(with msg: SendableMsg) -> Data {
        do {
            return try core.composeEmail(msg: msg, fmt: MsgFmt.encryptInline, pubKeys: msg.pubKeys).mimeEncoded
        } catch {
            fatalError()
        }
    }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions