Skip to content

Conversation

@geniusYoo
Copy link
Contributor

Related issue 🛠

Work Description ✏️

솝트로그 조회 시 간헐적으로 솝탬프 관련 오류가 뜨는 것을 확인했어요.

2025-03-28T13:39:40.122Z ERROR 1 --- [app-server] [nio-8080-exec-8] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: java.lang.IllegalArgumentException: User not found] with root cause

java.lang.IllegalArgumentException: User not found
	at org.sopt.app.application.rank.SoptampUserRankCalculator.lambda$getUserRank$3(SoptampUserRankCalculator.java:34) ~[!/:0.0.1-SNAPSHOT]
	at java.base/java.util.Optional.orElseThrow(Optional.java:403) ~[na:na]
	at org.sopt.app.application.rank.SoptampUserRankCalculator.getUserRank(SoptampUserRankCalculator.java:34) ~[!/:0.0.1-SNAPSHOT]
	at org.sopt.app.facade.RankFacade.findUserRank(RankFacade.java:117) ~[!/:0.0.1-SNAPSHOT]

해당 오류는 솝트로그 조회 API 중, 솝탬프 랭크를 가져오는 로직에서 발생한 문제인데요.

// 활동 기수인 경우 솝탬프 랭크 가져오는 로직
if (isActive) {
    soptampRank = rankFacade.findUserRank(user.getId());
}

이 때 soptamp_user에 등록되지 않은 경우 Not Found로 오류가 발생하고 있었어요.

기존에는 플그로 로그인/회원가입 시 기수를 확인 후에 soptamp_user를 생성하거나 기수를 업데이트하는 방식이었는데,
이를 플그로 로그인/회원가입 시에 사용자의 최근 기수로 soptamp_user를 무조건 생성하거나 업데이트하도록 변경했어요.

if(playgroundAuthService.isCurrentGeneration(latestGeneration)){
soptampUserService.upsertSoptampUser(playgroundProfile, userId);
}

soptampUserService.upsertSoptampUser(playgroundProfile, userId);

Trouble Shooting ⚽️

Related ScreenShot 📷

Uncompleted Tasks 😅

To Reviewers 📢

@geniusYoo geniusYoo added the 🛠️ BugFix 버그 해결 label Mar 28, 2025
@geniusYoo geniusYoo self-assigned this Mar 28, 2025
@height
Copy link

height bot commented Mar 28, 2025

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@geniusYoo geniusYoo merged commit b7997f5 into dev Mar 28, 2025
1 check passed
Copy link
Collaborator

@hyerinhwang-sailin hyerinhwang-sailin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

트러블 슈팅 고생하셨습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] 솝트로그 조회 시 간헐적으로 발생하는 버그 해결

2 participants