Created reusable error handling components that can be used across all
screens in both Android and iOS apps to show retry/cancel dialogs when
network calls fail.
Android Components:
- ApiResultHandler: Composable that automatically handles ApiResult states
with loading indicators and error dialogs
- HandleErrors(): Extension function for ApiResult to show error dialogs
for operations that don't return display data
- Updated ResidencesScreen to import ApiResultHandler
iOS Components:
- ViewStateHandler: SwiftUI view that handles loading/error/success states
with automatic error alerts
- handleErrors(): View modifier for automatic error monitoring
- Both use the existing ErrorAlertModifier for consistent alerts
Documentation:
- Created ERROR_HANDLING.md with comprehensive usage guide
- Includes examples for data loading and create/update/delete operations
- Migration guide for updating existing screens
- Best practices and testing guidelines
These utilities make it easy to add consistent error handling with retry
functionality to any screen that makes network calls, improving the user
experience across the entire app.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>