diff --git a/data/api/trakt/src/main/java/io/filmtime/data/api/trakt/TraktSearchRemoteSourceImpl.kt b/data/api/trakt/src/main/java/io/filmtime/data/api/trakt/TraktSearchRemoteSourceImpl.kt index 8b45a3b1..18d0f8d7 100644 --- a/data/api/trakt/src/main/java/io/filmtime/data/api/trakt/TraktSearchRemoteSourceImpl.kt +++ b/data/api/trakt/src/main/java/io/filmtime/data/api/trakt/TraktSearchRemoteSourceImpl.kt @@ -11,7 +11,10 @@ class TraktSearchRemoteSourceImpl @Inject constructor( ) : TraktSearchRemoteSource { override suspend fun getByTmdbId(id: String, type: TmdbType?): Result { return when (val result = traktIDLookupService.movieIDLookup(idType = "tmdb", id = id)) { - is NetworkResponse.ApiError -> TODO() // Will be handled in #31 + is NetworkResponse.ApiError -> { + val errorResponse = result.body + Result.Failure(GeneralError.ApiError(errorResponse.error, result.code)) + } is NetworkResponse.NetworkError -> Result.Failure(GeneralError.NetworkError) is NetworkResponse.Success -> { val body = result.body ?: emptyList() @@ -19,7 +22,7 @@ class TraktSearchRemoteSourceImpl @Inject constructor( return Result.Success(movieItemId) } - is NetworkResponse.UnknownError -> TODO() // Will be handled in #31 + is NetworkResponse.UnknownError -> Result.Failure(GeneralError.UnknownError(result.error)) } } } diff --git a/feature/trakt-login/src/main/java/io/filmtime/feature/trakt/login/TraktLoginWebView.kt b/feature/trakt-login/src/main/java/io/filmtime/feature/trakt/login/TraktLoginWebView.kt index 1e000696..7e9d203a 100644 --- a/feature/trakt-login/src/main/java/io/filmtime/feature/trakt/login/TraktLoginWebView.kt +++ b/feature/trakt-login/src/main/java/io/filmtime/feature/trakt/login/TraktLoginWebView.kt @@ -104,7 +104,7 @@ fun TraktLoginWebView( Column( horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center, - modifier = Modifier.fillMaxSize() + modifier = Modifier.fillMaxSize(), ) { CircularProgressIndicator( modifier = Modifier.wrapContentSize(),