File tree Expand file tree Collapse file tree 3 files changed +7
-33
lines changed
src/main/kotlin/org/gitanimals Expand file tree Collapse file tree 3 files changed +7
-33
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import org.gitanimals.rank.controller.response.RankTotalCountResponse
88import org.gitanimals.rank.domain.RankQueryRepository
99import org.gitanimals.rank.domain.history.RankHistoryService
1010import org.gitanimals.rank.domain.response.RankResponse
11+ import org.slf4j.LoggerFactory
1112import org.springframework.http.ResponseEntity
1213import org.springframework.web.bind.annotation.GetMapping
1314import 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
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import org.gitanimals.core.ratelimit.RateLimitable
1010import org.gitanimals.core.slack.SlackSender
1111import org.gitanimals.supports.ratelimit.InmemoryGithubRateLimiter.CoroutineDispatcher.coroutineContext
1212import org.slf4j.LoggerFactory
13- import org.springframework.scheduling.annotation.Scheduled
1413import org.springframework.stereotype.Component
1514import java.util.concurrent.Executors
1615import java.util.concurrent.TimeUnit
You canโt perform that action at this time.
0 commit comments