diff --git a/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/service/RequestMatchService.java b/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/service/RequestMatchService.java index 8ddd378a..b321f6de 100644 --- a/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/service/RequestMatchService.java +++ b/genti-api/src/main/java/com/gt/genti/picturegeneraterequest/service/RequestMatchService.java @@ -126,7 +126,9 @@ private void matchRequestToAdmin(PictureGenerateRequest pgr, Creator adminCreato adminCreator.addPictureGenerateResponse(newPGRES); pgresList.add(newPGRES); gentiMatchResult.addMatchResult( - "email : %s가 요청한 id : %d 요청을 어드민에게 매칭".formatted(pgr.getRequester().getEmail(), pgr.getId())); + "[요청자 email] : %s [요청자 id] : %d [작업자 email] : %s [작업자 id] : %d [프롬프트] : %s [비율] : %s [앵글] : %s ".formatted( + pgr.getRequester().getEmail(), pgr.getId(), adminCreator.getUser().getEmail(), adminCreator.getId(), + pgr.getPrompt(), pgr.getPictureRatio().getResponse(), pgr.getCameraAngle().getResponse())); } private void matchRequestToCreator(PictureGenerateRequest pgr, Creator creator, GentiMatchResult gentiMatchResult) { diff --git a/genti-auth/src/main/java/com/gt/genti/jwt/JwtTokenProvider.java b/genti-auth/src/main/java/com/gt/genti/jwt/JwtTokenProvider.java index 493f91ad..3fb4633a 100644 --- a/genti-auth/src/main/java/com/gt/genti/jwt/JwtTokenProvider.java +++ b/genti-auth/src/main/java/com/gt/genti/jwt/JwtTokenProvider.java @@ -138,7 +138,7 @@ public void validateToken(String token) { } catch (MalformedJwtException | IllegalArgumentException | UnsupportedJwtException | SignatureException e) { throw ExpectedException.withLogging(ResponseCode.INVALID_TOKEN); } catch (ExpiredJwtException e) { - throw ExpectedException.withLogging(TOKEN_EXPIRED); + throw ExpectedException.withoutLogging(TOKEN_EXPIRED); } } diff --git a/genti-common/src/main/java/com/gt/genti/error/ResponseCode.java b/genti-common/src/main/java/com/gt/genti/error/ResponseCode.java index aa5fff2c..b7c2ac24 100644 --- a/genti-common/src/main/java/com/gt/genti/error/ResponseCode.java +++ b/genti-common/src/main/java/com/gt/genti/error/ResponseCode.java @@ -25,7 +25,7 @@ public enum ResponseCode { * 인증/인가 */ TOKEN_NOT_PROVIDED(ErrorConstants.TOKEN_NOT_PROVIDED, HttpStatus.UNAUTHORIZED, false, "토큰이 전달되지 않았습니다."), - TOKEN_EXPIRED(ErrorConstants.TOKEN_EXPIRED, HttpStatus.UNAUTHORIZED, false, "토큰이 만료되었습니다."), + TOKEN_EXPIRED(ErrorConstants.TOKEN_EXPIRED, HttpStatus.UNAUTHORIZED, false, "액세스 토큰이 만료되었습니다."), INVALID_TOKEN(ErrorConstants.INVALID_TOKEN, HttpStatus.UNAUTHORIZED, false, "유효하지 않은 토큰입니다."), INSUFFICIENT_PERMISSIONS(ErrorConstants.INSUFFICIENT_PERMISSIONS, HttpStatus.FORBIDDEN, false, "접근 권한이 부족합니다."), REFRESH_TOKEN_EXPIRED(ErrorConstants.REFRESH_TOKEN_EXPIRED, HttpStatus.UNAUTHORIZED, false, "리프레시 토큰이 만료되었습니다."), @@ -116,9 +116,9 @@ public enum ResponseCode { false, "사진생성요청을 요청한 유저만 볼 수 있습니다."), PictureGenerateRequestAlreadyProcessed(ErrorConstants.PictureGenerateRequestAlreadyProcessed, - BAD_REQUEST, - false, - "사진생성요청이 이미 처리중입니다."), + BAD_REQUEST, + false, + "사진생성요청이 이미 처리중입니다."), /** * User */ diff --git a/genti-external/src/main/java/com/gt/genti/discord/DiscordAppender.java b/genti-external/src/main/java/com/gt/genti/discord/DiscordAppender.java index 47a3a4bf..9802bb60 100644 --- a/genti-external/src/main/java/com/gt/genti/discord/DiscordAppender.java +++ b/genti-external/src/main/java/com/gt/genti/discord/DiscordAppender.java @@ -6,6 +6,7 @@ import java.time.format.DateTimeFormatter; import java.util.List; import java.util.Map; +import java.util.Objects; import org.apache.commons.text.StringEscapeUtils; import org.springframework.beans.factory.annotation.Value; @@ -43,11 +44,13 @@ public class DiscordAppender extends UnsynchronizedAppenderBase { private String username = "Error log"; private String adminAvatarUrl = "https://img.icons8.com/ios-filled/50/FA5252/business.png"; private String errorAvatarUrl = "https://img.icons8.com/ios-filled/50/22C3E6/error--v1.png"; + private String devErrorAvatarUrl = "https://img.icons8.com/ios-filled/50/FFFFFF/error--v1.png"; private String eventAvatarUrl = "https://img.icons8.com/ios-filled/50/40C057/confetti.png"; @Override protected void append(ILoggingEvent eventObject) { - DiscordWebHook discordWebhook = new DiscordWebHook(username, errorAvatarUrl, false); + String avatarUrl = Objects.equals(profile, "staging") ? devErrorAvatarUrl : errorAvatarUrl; + DiscordWebHook discordWebhook = new DiscordWebHook(username, avatarUrl, false); Map mdcPropertyMap = eventObject.getMDCPropertyMap(); Color messageColor = getLevelColor(eventObject);