Skip to content

Commit f2c0dec

Browse files
authored
release: 2.4.4 (#433)
2 parents 1ca2c0d + 728dd92 commit f2c0dec

File tree

3 files changed

+7
-33
lines changed

3 files changed

+7
-33
lines changed

โ€Žsrc/main/kotlin/org/gitanimals/rank/controller/RankController.ktโ€Ž

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import org.gitanimals.rank.controller.response.RankTotalCountResponse
88
import org.gitanimals.rank.domain.RankQueryRepository
99
import org.gitanimals.rank.domain.history.RankHistoryService
1010
import org.gitanimals.rank.domain.response.RankResponse
11+
import org.slf4j.LoggerFactory
1112
import org.springframework.http.ResponseEntity
1213
import org.springframework.web.bind.annotation.GetMapping
1314
import org.springframework.web.bind.annotation.PathVariable
@@ -21,6 +22,8 @@ class RankController(
2122
private val rankHistoryService: RankHistoryService,
2223
) {
2324

25+
private val logger = LoggerFactory.getLogger(this::class.simpleName)
26+
2427
@GetMapping("/ranks")
2528
fun findAllRanks(
2629
@RequestParam("rank") rank: Int,
@@ -35,12 +38,12 @@ class RankController(
3538
): ResponseEntity<out Any> {
3639
return runCatching {
3740
ResponseEntity.ok(getRankByUsernameFacade.invoke(username))
38-
}.getOrElse {
41+
}.getOrElse { exception ->
42+
logger.info(exception.message, exception)
43+
3944
ResponseEntity
4045
.badRequest()
41-
.body(
42-
ErrorResponse("Cannot find rank by username: \"$username\"")
43-
)
46+
.body(ErrorResponse("Cannot find rank by username: \"$username\""))
4447
}
4548
}
4649

โ€Žsrc/main/kotlin/org/gitanimals/render/infra/HttpClientErrorHandler.ktโ€Ž

Lines changed: 0 additions & 28 deletions
This file was deleted.

โ€Žsrc/main/kotlin/org/gitanimals/supports/ratelimit/InmemoryGithubRateLimiter.ktโ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import org.gitanimals.core.ratelimit.RateLimitable
1010
import org.gitanimals.core.slack.SlackSender
1111
import org.gitanimals.supports.ratelimit.InmemoryGithubRateLimiter.CoroutineDispatcher.coroutineContext
1212
import org.slf4j.LoggerFactory
13-
import org.springframework.scheduling.annotation.Scheduled
1413
import org.springframework.stereotype.Component
1514
import java.util.concurrent.Executors
1615
import java.util.concurrent.TimeUnit

0 commit comments

Comments
ย (0)