Malformed storage metadata can crash with traceback instead of user-facing error#2154
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves error handling for malformed storage metadata in Dropbox and Google Drive folder location detection functions. Previously, malformed metadata could cause the application to crash with a traceback; now it provides user-facing error messages.
Changes:
- Enhanced
get_dropbox_folder_location()to validate host.db format and handle decoding errors gracefully - Enhanced
get_google_drive_folder_location()to handle missing database entries and SQLite errors - Added unit tests for malformed Dropbox host.db and missing Google Drive path entries
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/mackup/utils.py | Added validation and comprehensive exception handling for Dropbox and Google Drive folder detection |
| tests/test_utils.py | Added tests verifying graceful error handling for malformed storage metadata |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Improves error handling and robustness for Dropbox and Google Drive folder location detection in
src/mackup/utils.py, and adds corresponding unit tests intests/test_utils.py.