This commit is contained in:
dev-claw
2025-03-11 15:42:41 +01:00
committed by GitHub
parent f2c9806665
commit e44220321e
2 changed files with 8 additions and 13 deletions
@@ -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
}
}
}
@@ -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()
}