diff --git a/vripper-core/src/main/kotlin/me/vripper/services/AppEndpointService.kt b/vripper-core/src/main/kotlin/me/vripper/services/AppEndpointService.kt index 1a6350e..7bef12a 100644 --- a/vripper-core/src/main/kotlin/me/vripper/services/AppEndpointService.kt +++ b/vripper-core/src/main/kotlin/me/vripper/services/AppEndpointService.kt @@ -119,6 +119,9 @@ internal class AppEndpointService( ) } val threadLookupResult = threadCacheService[thread.threadId] + if (threadLookupResult.error.isNotBlank()) { + throw PostParseException("Error occurred for threadId = $threadId, ${threadLookupResult.error}") + } threadLookupResult.postItemList.map { postItem -> PostSelection( postItem.threadId, @@ -132,23 +135,13 @@ internal class AppEndpointService( postItem.forum, postItem.imageItemList.map { it.thumbLink }) }.ifEmpty { - log.error( - String.format( - "Failed to get links for threadId = %s", threadId - ) - ) throw PostParseException( - String.format( - "Failed to get links for threadId = %s", threadId - ) + "Nothing found for threadId = $threadId" ) } } catch (e: Exception) { - throw PostParseException( - String.format( - "Failed to get links for threadId = %s, %s", threadId, e.message - ) - ) + log.error(e.message) + throw e } } } diff --git a/vripper-gui/src/main/kotlin/me/vripper/gui/services/GrpcEndpointService.kt b/vripper-gui/src/main/kotlin/me/vripper/gui/services/GrpcEndpointService.kt index cdecadc..ad1a7c3 100644 --- a/vripper-gui/src/main/kotlin/me/vripper/gui/services/GrpcEndpointService.kt +++ b/vripper-gui/src/main/kotlin/me/vripper/gui/services/GrpcEndpointService.kt @@ -176,6 +176,8 @@ class GrpcEndpointService : IAppEndpointService { password = settings.viperSettings.password thanks = settings.viperSettings.thanks host = settings.viperSettings.host + requestLimit = settings.viperSettings.requestLimit + fetchMetadata = settings.viperSettings.fetchMetadata build() }