Exception Handling
Deletion of keyfile from Google Drive
An exception case after user has onboarded.
The main distinguishing feature in Keysmith is the creation of a secret keyfile and the storage of it in Google Drive. The ID of the file is stored in the database for Keysmith to retrieve it when the user signs in.
Issue
If the keyfile is deleted from Google Drive, Keysmith will attempt to retrieve a non-existing file when the user signs in.
Resolution
To resolve this issue, Keysmith needs to implement proper error handling for keyfile retrieval from Google Drive. The following steps should be taken:
- Detect missing keyfile: Keysmith should include logic to detect when the keyfile is not found in Google Drive during the authentication process.
- Display error message: When a missing keyfile is detected, Keysmith should display a user-friendly error message indicating that the keyfile is missing and cannot be retrieved.
- Prompt for action: Keysmith should prompt the user to upload a new keyfile to Google Drive or provide an option to generate a new keyfile within the application.
- Update database: If the user chooses to upload a new keyfile, the ID of the new keyfile should be updated in the database. If the user chooses to generate a new keyfile, a new keyfile should be generated and the ID of the new keyfile should be updated in the database. All remnants of the old keyfile should be deleted.
- Provide instructions: Clear instructions should be provided to the user on how to upload or generate a new keyfile and update their authentication settings in Keysmith,
- Provide clear warnings: Explicitly mention to user that generating a new keyfile will overwrite any existing wallets associated with the previous keyfile. This means that all assets stored in those wallets will be permanently lost and cannot be recovered.
- Implement logging and monitoring: Proper logging and monitoring mechanisms should be implemented to track keyfile retrieval errors and identify any potential issues in the future.
By implementing these steps, Keysmith can provide a better user experience by guiding users to resolve the issue of a missing keyfile and regain access to their wallets.
Failure to save file in Google Drive
An exception case when onboarding new users.
Illustration
Failure to save Google Drive File ID
An exception case when onboarding new users.