Catch errors on discover request tab (#765)

## Description
Handle errors on the Discover/Jellyseerr requests tab preventing crashes

Note: this PR fixes the crash, but the error was a 400, which is likely
due to the older Jellyseerr version.

### Related issues
Fixes #764
This commit is contained in:
Ray 2026-01-24 19:23:15 -05:00 committed by GitHub
parent fc0de2144d
commit 47e54aa675
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View file

@ -31,7 +31,7 @@ This is not a fork of the [official client](https://github.com/jellyfin/jellyfin
### User interface ### User interface
- A navigation drawer for quick access to libraries, favorites, search, and settings from almost anywhere in the app - A navigation drawer for quick access to libraries, favorites, search, and settings from almost anywhere in the app
- Integration with [Seerr](https://github.com/seerr-team/seerr) to discover new movies and TV shows - Integration with [Jellyseerr](https://github.com/seerr-team/seerr) to discover new movies and TV shows
- Option to combine Continue Watching & Next Up rows - Option to combine Continue Watching & Next Up rows
- Show Movie/TV Show titles when browsing libraries - Show Movie/TV Show titles when browsing libraries
- Play theme music, if available - Play theme music, if available
@ -93,6 +93,8 @@ Requires Android 6+ (or Fire TV OS 6+) and Jellyfin server `10.10.x` or `10.11.x
The app is tested on a variety of Android TV/Fire TV OS devices, but if you encounter issues, please file an issue! The app is tested on a variety of Android TV/Fire TV OS devices, but if you encounter issues, please file an issue!
Jellyseerr integration is tested with `v2.7.3`. Older versions may not work.
## Contributions ## Contributions
Issues and pull requests are always welcome! Please check before submitting that your issue or pull request is not a duplicate. Issues and pull requests are always welcome! Please check before submitting that your issue or pull request is not a duplicate.

View file

@ -40,6 +40,7 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.async import kotlinx.coroutines.async
import kotlinx.coroutines.awaitAll import kotlinx.coroutines.awaitAll
import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.flow.update import kotlinx.coroutines.flow.update
@ -112,6 +113,9 @@ class SeerrRequestsViewModel
state.update { it.copy(requests = DataLoadingState.Success(results)) } state.update { it.copy(requests = DataLoadingState.Success(results)) }
} }
}.catch { ex ->
Timber.e(ex, "Error fetching requests")
state.update { it.copy(requests = DataLoadingState.Error(ex)) }
}.launchIn(viewModelScope) }.launchIn(viewModelScope)
} }