DittoSwiftError
All errors that are thrown by the Ditto SDK are wrapped as a DittoSwiftError
. It wraps multiple
different types of error that each have an associated reason.
You can access more specific information about an error by switching over the error’s reason
value. If
you want a human-readable version of the error then call localizedDescription
on the error’s reason.
- activationError: An error occurred relating to activating the Ditto instance.
- authenticationError: An error occurred relating to authenticating the Ditto instance.
- migrationError: An error occurred relating to migrations.
- storeError: An error occurred relating to the store.
- transportError: An error occurred relating to the network transports.
-
The possible underlying reasons an
.activationError
error occurs.- notActivatedError: The
Ditto
instance has not yet been activated, which is achieved via a successful call tosetAccessLicense
. - licenseTokenExpired: The provided license token has expired.
- licenseTokenVerificationFailed: Verification of the provided license token failed.
- licenseTokenUnsupportedFutureVersion: The provided license token is in an unsupported future format.
- notActivatedError: The
-
The possible underlying reasons an
.authenticationError
error occurs.- failedToAuthenticate: Failed to authenticate with remote server.
-
The possible underlying reasons a
.migrationError
error occurs.- disableSyncWithV3Failed: The operation to disable sync with v3 peers failed.
-
The possible underlying reasons a
.storeError
error occurs.- backendError: An error occurred with the storage backend (LMDB).
- documentContentEncodingFailed: The provided document content failed to be encoded.
- nonStringKeyInDocument: The document, represented as a CBOR map, had a key that was not a string.
- invalidDocumentStructure: The document’s internal representation was invalid.
- failedToDecodeData: Data could not be decoded.
- failedToGetDocumentData: The document’s data at the specified path could not be obtained.
- failedToGetDocumentIDData: The document ID’s data at the specified path could not be obtained.
- failedToDecodeDocument: The document could not be decoded.
- documentNotFound: The document could not be found.
- attachmentDataRetrievalError: The attachment data failed to be retrieved.
- attachmentFileCopyError: The attachment file failed to be copied.
- queryError: The query was invalid.
- quaryArgumentsInvalid: The query arguments were invalid.
- invalidCRDTType: An invalid CRDT type was encountered.
- invalidValueForCRDT: An invalid value was encountered for a corresponding CRDT type.
-
The possible underlying reasons a
.transportError
error occurs.- diagnosticsUnavailable: The request to get transport diagnostics failed.
- failedToDecodeTransportDiagnostics: Decoding of transport diagnostics data failed.
-
The possible underlying reasons for encryption errors.
See more -
-
-
-
-
-
-
-
Provides a description of the error.