Skip to main content

OperationError

Type Alias OperationError 

Source
pub type OperationError = SyncError;
Expand description

An operation failure retains the same typed causes as an ordinary sync call.

Aliased Type§

pub enum OperationError {
Show 31 variants Pending(Box<PendingRecord>), Failed { failure: LocalFailure, source: Arc<dyn Error + Sync + Send>, }, Cleanup { operation: Box<SyncError>, cleanup: Box<SyncError>, }, NoStorage, StoreOwner, InvitationChanged, NotPending(OperationId), ReloadPending(OperationId), SnapshotPending(OperationId), OperationData(Error), SequenceExhausted, Storage(StorageError), Database(DbError), SecureStorage(KeyError), Crypto(CryptoError), Format(Error), Key(MaterialError), KeyUnavailable { audience: Audience, key: KeyId, }, Rejected(OperationRejection), CutOffRefused(CutOffRefusal), Damaged(DamagedObject), Removed, NotAdmitted, ReplacementPending { access_key_id: String, }, DeviceIdInUse(DeviceIdEvidence), MemberKeysReplaced { member: MemberId, }, UpdateRequired(RequiredUpdate), Code(CodeError), Shutdown(Shutdown), Bug(Bug), WorkerFailed(Bug),
}

Variants§

§

Pending(Box<PendingRecord>)

This call requires work that cannot yet advance.

§

Failed

A local invariant or resource failed, classified without erasing its native cause. One failure delivered to several callers shares one cause.

Fields

§failure: LocalFailure

Durable local category.

§source: Arc<dyn Error + Sync + Send>

Original failure retained by the initiating call.

§

Cleanup

A later step, such as a rollback or closing another owner, failed too; neither failure is hidden.

Fields

§operation: Box<SyncError>

The original failure.

§cleanup: Box<SyncError>

The later failure, such as restoring the original state.

§

NoStorage

This call requires connected storage; durable work remains queued.

§

StoreOwner

The member whose account holds the store can’t be removed, and their access can’t move to another account (§10.1): OneDrive and CloudKit can’t hand a store to another account, and coven doesn’t use Dropbox’s ownership transfer (bae-fm/coven#237).

§

InvitationChanged

The request or invitation is absent, expired, or no longer matches.

§

NotPending(OperationId)

The requested journal row is not failed app work available for retry or discard.

§

ReloadPending(OperationId)

Administrative and snapshot publication wait for the retained reload (§11).

§

SnapshotPending(OperationId)

Deleting stored files waits for this unfinished snapshot, whose journal still owns references no row holds (§17.10).

§

OperationData(Error)

Decoding persisted operation data failed; its cause remains available.

§

SequenceExhausted

The sequence has no next slot: slot numbers are u64s, and the slot it would follow is the last one.

§

Storage(StorageError)

Storage refused or failed a request.

§

Database(DbError)

The local database failed.

§

SecureStorage(KeyError)

Unlocking or keeping keys failed.

§

Crypto(CryptoError)

Making encrypted or signed bytes failed.

§

Format(Error)

The proposed entry violates its byte format.

§

Key(MaterialError)

A required key has not arrived or the local key material conflicts.

§

KeyUnavailable

A required key’s sealed copy has not arrived.

Fields

§audience: Audience

The audience the key belongs to.

§key: KeyId

The missing key.

§

Rejected(OperationRejection)

The proposed change is already invalid in the author’s applied view.

§

CutOffRefused(CutOffRefusal)

confirm_device_cut_off changed nothing, for this reason.

§

Damaged(DamagedObject)

A required object failed authentication or parsing.

§

Removed

This device or its member was removed; syncing stops for good (§14.1).

§

NotAdmitted

A joined store read to the end of the sequence with its pair bound nowhere in its history: the admission that published it was refused, and its device never became a member. Syncing stops for good (§13.2, §14.1).

§

ReplacementPending

A replacement of this member’s S3 key by another key is still under way: its id isn’t recorded yet, or custody doesn’t connect with it yet (§14.3). Retrying with that key finishes it; once it ends, another key can replace it.

Fields

§access_key_id: String

The key the replacement under way records.

§

DeviceIdInUse(DeviceIdEvidence)

Another copy uses this device’s id, as this evidence shows. This copy sends nothing more; nothing is recorded, and reset_device is the app’s option (§19.3).

§

MemberKeysReplaced

Held signing credentials are no longer current for this stable id, or an object was fixed under credentials that are no longer current. Sending stops; it never re-signs an old object with newer keys (§14.1).

Fields

§member: MemberId

The stable member whose keys were replaced.

§

UpdateRequired(RequiredUpdate)

This call needs a newer app schema or coven format (§18).

§

Code(CodeError)

A code can’t be used for this call, as one naming another store.

§

Shutdown(Shutdown)

The call’s runtime is shutting down and dropped its work (E15). A database call the blocking pool dropped unstarted changed nothing; a call that runs as its own task, as closing and replacing credentials do, may have stopped partway.

§

Bug(Bug)

The call’s work panicked: a bug in coven, which the caller reports (E15). Its category is LocalFailure::Bug.

§

WorkerFailed(Bug)

The worker this call needs ended on a panic: the sync loop, a connection attempt or the upload worker. The store’s bug sink heard the bug as it happened, so the app shows this and doesn’t report it again (E15). Its category is LocalFailure::Bug.