Skip to content

Handle error state

Compare
Choose a tag to compare
@ffgiraldez ffgiraldez released this 11 May 23:01
· 17 commits to main since this release
e2f99ba

Create a new property on QueryViewModel error to describe an error on UI
Create a new QueryViewState error to model the state
To not duplicate code on data sources, errors are handled on ComicRepository
Model error using Either<ComicError, List>
Empty results on ComicLocalDataSource produce EmptyResultsError
Any network error produce NetworkError
Suggestions will display error as a single suggestion
A search will display error as text on the screen, hiding result list
Error suggestions do not propagate search results