Skip to content

feat(firebase): add specific error code handling#83

Open
jaodsilv wants to merge 1 commit intomainfrom
feature/issue-14-firebase-error-handling
Open

feat(firebase): add specific error code handling#83
jaodsilv wants to merge 1 commit intomainfrom
feature/issue-14-firebase-error-handling

Conversation

@jaodsilv
Copy link
Copy Markdown
Owner

@jaodsilv jaodsilv commented Apr 2, 2026

Summary

  • Add classifyFirebaseError helper that maps Firebase error codes to user-friendly messages
  • Handle specific error types: quota-exceeded, permission-denied, unauthenticated, unavailable, and generic
  • Replace direct error.message usage in sync handlers with classified error messages
  • Ensure showSyncToast is called consistently across all sync error paths (sync to cloud, sync all, pull from cloud, manual sync)

Closes #14

Test plan

  • Build succeeds: python build_tracker.py
  • Tests pass with 90%+ coverage: cd tests && npm test
  • Firebase quota exceeded error shows correct warning toast
  • Firebase permission-denied error shows descriptive message
  • Firebase unauthenticated error prompts re-sign-in
  • Firebase unavailable/network error shows connectivity message
  • Unknown errors fall back to generic message

…code handling

- Added classifyFirebaseError() to categorize Firebase errors by type
- Returns structured error classification with user-friendly messages
- Handles permission-denied, unauthenticated, unavailable error codes
- Updated 4 catch blocks (syncFileToCloud, syncAllToCloud, pullFromCloud, manualSyncNow) to use classification
- Improved error messaging consistency and user experience
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

Build Size

tracker.html: 867.68KB

Built with Python 3.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Firebase error handling with specific error codes

1 participant