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 Codes and Their Descriptions

ErrorDescription
ExpiredAuthTokenReturned when the auth token is no longer valid.
UnauthorizedThe user associated with the auth token is not authorized to perform this operation.
UserNotFoundThe current user doesn’t exist or is invalid.
InternalErrorUnexpected internal logic and state errors.
PreconditionErrorThe operation was rejected because the system is not in a required state for execution.
Examples: SDK version mismatch, Backup state inconsistency.
InvalidArgsThe client specified 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

Backup and Decryption Error Codes

Error CodeDescription
KeysAreNotBackedUpWithEncryptionKeyKeys were not backed up with the provided encryption key.
DecryptionInfoRestoreFailedThis error occurs due to the following reasons:
1. Decryption file cannot be found.
2. Failed to restore decryption info.
CorruptedDecryptionFileIndicates that the decryption backup file is corrupted.
GoogleDriveQueryExecutionFailedFailed to execute a query on Google Drive.
GoogleSignInFailedFailed to sign in to Google Drive.
ICloudDisablediCloud backup is disabled.
ICloudNotSynchronizediCloud synchronization failed.