Errors#
calendaring-sync’s error hierarchy.
Every error the library raises on purpose derives from
CalendaringSyncError, except for arguments that can never be
valid: those raise ValueError, such as a negative cursor, or
TypeError, such as content that isn’t bytes. A record a store
can’t hold raises RecordValueError, which is both a
CalendaringSyncError and a ValueError.
- exception calendaring_sync.error.CalendaringSyncError[source]#
Bases:
ExceptionBase for every calendaring-sync error.
- exception calendaring_sync.error.DuplicateObjectError[source]#
Bases:
CalendaringSyncError
- exception calendaring_sync.error.EditRefusedError[source]#
Bases:
CalendaringSyncErrorThe record is in a state that takes no local edit.
Its subclasses say which: a push in flight, an open conflict, or a record the server removed.
- exception calendaring_sync.error.OpenConflictError[source]#
Bases:
EditRefusedErrorThe record holds an open conflict; resolve it before editing.
- exception calendaring_sync.error.PendingEditError[source]#
Bases:
CalendaringSyncErrorThe record holds a pending edit of its own, which this would replace.
Push or discard that edit first, then try again.
- exception calendaring_sync.error.PushInFlightError[source]#
Bases:
EditRefusedErrorThe record’s push is in flight; edit it once the push has ended.
- exception calendaring_sync.error.RecordValueError[source]#
Bases:
CalendaringSyncError,ValueErrorA record holds what its state can’t, so a store refuses to write it.
For example a pending record without a pending edit, or a conflict that says the server removed the object but holds the server’s content. It’s a
ValueErrortoo, since such a record can never be valid.
- exception calendaring_sync.error.RemovedRecordError[source]#
Bases:
EditRefusedErrorThe record was removed from the server, so there’s nothing to edit.
- exception calendaring_sync.error.ScopeMismatchError[source]#
Bases:
CalendaringSyncErrorA session was opened with a media type the scope doesn’t have.
The stored content is in the scope’s media type, so it can’t be reused. Drop the scope and sync it again.
- exception calendaring_sync.error.SessionError[source]#
Bases:
CalendaringSyncErrorA session was used out of order.
For example a second session on a scope that already has one open, an ingest after the session’s last page, or a reset while a session is open.
- exception calendaring_sync.error.StaleChangeSetError[source]#
Bases:
CalendaringSyncErrorA change set was fetched from a token the scope no longer has.
Another process ingested first, or started another listing of the same scope. The changes it fetched are already outdated, so the adapter fetches again from the scope’s current token.
- exception calendaring_sync.error.StaleConflictError[source]#
Bases:
CalendaringSyncErrorThe conflict changed since your application read it, so a resolution isn’t applied.
The record ended, or its edit or the server’s side moved on. Read it again and decide on what it holds now.
- exception calendaring_sync.error.StoreBusyError[source]#
Bases:
StoreErrorAnother process kept the store busy for longer than the store waits.
Nothing was changed. Try again later.
- exception calendaring_sync.error.StoreError[source]#
Bases:
CalendaringSyncErrorThe store couldn’t read or write its data, such as a file that isn’t a store.
- exception calendaring_sync.error.StoreVersionError[source]#
Bases:
StoreErrorThe store was written by a newer calendaring-sync, with a schema this one can’t read.
- exception calendaring_sync.error.TransactionError[source]#
Bases:
CalendaringSyncErrorA store transaction was used the wrong way.
Raised for a transaction opened while the thread already has one, and for closing the store inside a transaction. Its subclasses cover an operation outside a transaction and a write inside a read.
- exception calendaring_sync.error.TransactionPermissionError[source]#
Bases:
TransactionErrorA store operation that writes ran in a transaction opened with
write=False.
- exception calendaring_sync.error.TransactionRequiredError[source]#
Bases:
TransactionErrorA store operation ran outside a transaction.
- exception calendaring_sync.error.TrimmedFeedError[source]#
Bases:
CalendaringSyncErrorA cursor is older than the oldest change feed entry kept.
The entries after the cursor were trimmed, so they can’t be read. Read the scope’s records again, and continue from
feed_head().
- exception calendaring_sync.error.UnexpectedStoreError[source]#
Bases:
CalendaringSyncErrorA store failed in a way it doesn’t expect, which is a bug in it or its caller.
It isn’t a
StoreError, so code that retries on a store error doesn’t retry a bug. The original exception is its__cause__.
- exception calendaring_sync.error.UnknownHolderError[source]#
Bases:
CalendaringSyncErrorNo single record is known to hold what a refused create was refused for.
The server named no record that’s still there, and none or several hold the create’s logical key, or it was sent without one. So the create can’t be pushed as a change to one of them. Resolve it another way, or sync first.
- exception calendaring_sync.error.UnknownRecordError[source]#
Bases:
CalendaringSyncError
- exception calendaring_sync.error.UnknownScopeError[source]#
Bases:
CalendaringSyncError