AOSSIE-Org / AOSSIE-Org/Resonate

Add centralized error handling service

Open
#722 4 comments 0 reactions 0 assignees Claimed by @TenFinges View on GitHub
Dominant language
Dart
Stars
344
Forks
350
PR merge metrics
No merged PRs in 30d

Description

## Problem
Error handling is scattered across 50+ catch blocks with inconsistent patterns:
- Some catch blocks only log errors without informing users
- Some show raw exception messages to users
- Accessibility announcements are inconsistently applied

## Proposed Solution
Create a centralized [ErrorService](cci:2://file:///Users/rohan/projects/Resonate/lib/services/error_service.dart:27:0-252:1) that provides:
- Consistent user-friendly error messages
- Accessibility announcements (TalkBack/VoiceOver support)
- Typed error categorization (network, auth, storage, database, validation)
- Centralized logging

## Implementation
- Create [ErrorService](cci:2://file:///Users/rohan/projects/Resonate/lib/services/error_service.dart:27:0-252:1) class with [handle()](cci:1://file:///Users/rohan/projects/Resonate/lib/services/error_service.dart:28:2-68:3) and [handleSilently()](cci:1://file:///Users/rohan/projects/Resonate/lib/services/error_service.dart:70:2-80:3) methods
- Create [ErrorType](cci:1://file:///Users/rohan/projects/Resonate/lib/services/error_service.dart:230:2-251:3) enum for error categorization
- Add localization strings for error messages
- Update controllers to use the new service

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.