Logging and Error Handling

Add logging and error handling facilities to embedded SDKs.

The pages in this section provide instructions for implementing logging and error handling for the following Fordefi SDKs:

Error codes

The following are the error codes that the different SDKs can return, with a description of each:

General errors

Error

Description

ExpiredAuthToken

Returned when auth token is no longer valid.

Unauthorized

The user associated with the auth token is not authorized to perform this operation.

UserNotFound

Current user doesn’t exist or is invalid.

InternalError

Unexpected internal logic and state errors.

PreconditionError

The operation was rejected because the system is not in a state required for the operation's execution. For example: SDK version mismatch, Backup state inconsistency.

InvalidArgs

The client specified an invalid argument(s).

KeysAreNotSynced

The expected keys were not found, call login() again.

Backup errors

ErrorDescription
GoogleDriveQueryExecutionFailedFailed execute query on Google Drive
GoogleSignInFailedFailed signing in to Google Drive
ICloudDisablediCloud backup disabled
ICloudNotSynchronizediCloud synchronization failed
FailedSavingDecryptionKeyFailed to synchronize keys backup decryption key to iCloud

Recover errors

Error

Description

KeysAreNotBackedUpWithEncryptionKey

Keys were not backed up with the provided encryption key

DecryptionInfoRestoreFailed

Reasons:
1. Decryption file can not be found
2. Failed to restore decryption info

CorruptedDecryptionFile

Corrupted decryption backup file

GoogleDriveQueryExecutionFailed

Failed execute query on Google Drive

GoogleSignInFailed

Failed signing in to Google Drive

ICloudDisabled

iCloud backup disabled

ICloudNotSynchronized

iCloud synchronization failed