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

ErrorDescription
ExpiredAuthTokenReturned when auth token is no longer valid.
UnauthorizedThe user associated with the auth token is not authorized to perform this operation.
UserNotFoundCurrent user doesn’t exist or is invalid.
InternalErrorUnexpected internal logic and state errors.
PreconditionErrorThe 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.
InvalidArgsThe client specified an invalid argument(s).
KeysAreNotSyncedThe 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

ErrorDescription
KeysAreNotBackedUpWithEncryptionKeyKeys were not backed up with the provided encryption key
DecryptionInfoRestoreFailedReasons:
1. Decryption file can not be found
2. Failed to restore decryption info
CorruptedDecryptionFileCorrupted decryption backup file
GoogleDriveQueryExecutionFailedFailed execute query on Google Drive
GoogleSignInFailedFailed signing in to Google Drive
ICloudDisablediCloud backup disabled
ICloudNotSynchronizediCloud synchronization failed