REDI-98: error-handling demo screen (DataError -> UiText pipeline)
A runnable MVI screen (reached from the list overflow menu) that forces a real DataError.Network case and routes it through the same pipeline a genuine call uses: Result.Error -> onFailure -> DataError.toUiText() -> design-system ErrorState. Three distinct cases (NO_INTERNET, NOT_FOUND, SERVER_ERROR) each render their mapped message; Retry re-issues the last attempt via an Action; a successful load clears the error. Wired as intra-feature navigation (ErrorDemoRoute) and registered in Koin (incl. the UseCase factoryOf).
This commit is contained in:
@@ -10,6 +10,17 @@
|
||||
<string name="cd_more_options">More options</string>
|
||||
<string name="menu_about">About</string>
|
||||
<string name="menu_open_as_views">Open as Views</string>
|
||||
<string name="menu_error_demo">Error handling demo</string>
|
||||
|
||||
<!-- Error-handling demo screen -->
|
||||
<string name="error_demo_title">Error handling demo</string>
|
||||
<string name="error_demo_intro">Force a network failure to watch it flow through the pipeline: DataError.Network → toUiText() → the shared ErrorState. Retry re-issues the same request; a successful load clears the error.</string>
|
||||
<string name="error_demo_force_no_internet">Force: No internet</string>
|
||||
<string name="error_demo_force_not_found">Force: Not found</string>
|
||||
<string name="error_demo_force_server">Force: Server error</string>
|
||||
<string name="error_demo_load_success">Load (success)</string>
|
||||
<string name="error_demo_success">Loaded successfully ✓</string>
|
||||
<string name="error_demo_hint">Pick an action above to see the result here.</string>
|
||||
|
||||
<!-- Detail screen -->
|
||||
<string name="character_detail_title">Character</string>
|
||||
|
||||
Reference in New Issue
Block a user