Delivery errors are discarded, so callers cannot tell whether invitations were sent
Source references: 3The email component explicitly returns either #ok or #err with error text, but sendEventInvitation discards that result with ignore and returns async ().
The application may treat the call as successful even when authorization or delivery failed. Users may make plans based on invitations that were never sent, while the error is unavailable for alerting or retry.
The email interface explicitly allows an `#err` result containing error text, but the example sender discards the awaited result with `ignore` and returns `async ()`. If the mail service rejects or fails a send, the caller cannot learn that from this function, so an administrator may wrongly assume invitations were delivered and make incorrect scheduling decisions. Users can ask for the result to be checked and returned, failures to be logged, and retry or failure notifications.
public type SendResult = { #ok; #err : Text; }; public func sendCalendarEvent(fromUsername : Text, event : CalendarEvent) : async SendResult;};Show 2 other places
ignore await EmailClient.sendCalendarEvent( "no-reply", event ); }; public shared ({ caller }) func sendEventInvitation(uid : Text) : async () { if (not (AccessControl.hasPermission(accessControlState, caller, #admin))) {