fix: NCS-84 More Verbose Logging (#51)
Build & Test (NowChessSystems) TeamCity build failed

Reviewed-on: #51
This commit was merged in pull request #51.
This commit is contained in:
2026-05-16 11:20:05 +02:00
parent c65a1393b9
commit 4ad92ab236
9 changed files with 18 additions and 18 deletions
@@ -79,7 +79,7 @@ class OfficialChallengeResource:
Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(ErrorDto(err)).build()
case Right(id) =>
try botEventPublisher.publishGameStart(bot.name, id, botColor, difficulty, bot.id.toString)
catch case ex: Exception => log.warnf(ex, "Failed to notify bot for game %s", id)
catch case ex: Exception => log.errorf(ex, "Failed to notify bot for game %s", id)
Response
.status(Response.Status.CREATED)
.entity(OfficialChallengeResponse(id, botName, difficulty))
@@ -95,7 +95,7 @@ class ChallengeService:
challenge.expiresAt = Instant.now().plus(24, ChronoUnit.HOURS)
challengeRepository.persist(challenge)
try eventPublisher.publishChallengeCreated(destUser.id.toString, challenge.id.toString, challenger.username)
catch case ex: Exception => log.warnf(ex, "Failed to notify dest user for challenge %s", challenge.id)
catch case ex: Exception => log.errorf(ex, "Failed to notify dest user for challenge %s", challenge.id)
challenge
@Transactional
@@ -116,7 +116,7 @@ class ChallengeService:
challengeRepository.merge(challenge)
notifyBotIfNeeded(challenge, gameId)
try eventPublisher.publishChallengeAccepted(challenge.challenger.id.toString, challenge.id.toString, gameId)
catch case ex: Exception => log.warnf(ex, "Failed to notify challenger for game %s", gameId)
catch case ex: Exception => log.errorf(ex, "Failed to notify challenger for game %s", gameId)
challenge
@Transactional