Table of Contents

Method RecordFailureAsync

Namespace
MailFathom.Application.Mail.Mutations
Assembly
MailFathom.Application.dll

RecordFailureAsync(IPersistenceSession, MailboxMutationRecordId, MailFathomErrorCode, CancellationToken)

Records the failure the last attempt ended in, without moving the stage.

Task RecordFailureAsync(IPersistenceSession session, MailboxMutationRecordId recordId, MailFathomErrorCode failure, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The session the write joins.

recordId MailboxMutationRecordId

The record the attempt belonged to.

failure MailFathomErrorCode

The code identifying what ended the attempt.

cancellationToken CancellationToken

Cancels the write.

Returns

Task

A task that completes when the failure is written.

Remarks

The stage stays where the sequence actually got to, which is what a resumed attempt reads; the failure says why it got no further.

Exceptions

ArgumentNullException

Thrown when session is null.

InvalidOperationException

Thrown when no record carries recordId.