Project

[혈당당, BE 협업] 500에러, 이슈 원인 파악하고 노티 과정

남남이루 2023. 4. 27. 10:27

🚩 {{base_url}}/api/v1/admin/users 유저 목록 조회 api 500 에러

Tags BE
Date @April 22, 2023
Status Done
구분 이슈
  • API 반환값 (브라우저 환경)
{
  "timestamp": "2023-04-18T09:11:19.100+00:00",
  "status": 500,
  "error": "Internal Server Error",
  "path": "/api/v1/admin/users"
}
  • 포스트맨도 동일

postman 요청 반환값

문제 시점

17일 저녁부터 갑자기 안되네요
시간상 Dbeaber로 DB값 만진 다음인 거 같은데,
DB 데이터 수정 내역
19번 유저의 email, name
21번 유저의 email만 건드렸습니다!

AWS 서버 로그 찍어본 거

> tail -f nohup/stdout.txt|grep Illegal

2023-04-18 09:16:27.620 DEBUG 1035884 --- [nio-8080-exec-6] o.s.web.servlet.DispatcherServlet        : Failed to complete request: org.springframework.dao.InvalidDataAccessApiUsageException: No enum constant com.diabetes.user.domain.User.GenderType.; nested exception is java.lang.IllegalArgumentException: No enum constant com.diabetes.user.domain.User.GenderType.
2023-04-18 09:16:27.626 ERROR 1035884 --- [nio-8080-exec-6] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: No enum constant com.diabetes.user.domain.User.GenderType.; nested exception is java.lang.IllegalArgumentException: No enum constant com.diabetes.user.domain.User.GenderType.] with root cause
java.lang.IllegalArgumentException: No enum constant com.diabetes.user.domain.User.GenderType.
  • GenderType enum얘기라서 상관없을 거 같기도 한데.. 일단 긁어와봤습니다
> tail -f nohup/stdout.txt|grep Exception

2023-04-18 09:07:31.418 DEBUG 1035884 --- [nio-8080-exec-6] o.s.web.servlet.DispatcherServlet        : Failed to complete request: org.springframework.dao.InvalidDataAccessApiUsageException: No enum constant com.diabetes.user.domain.User.GenderType.; nested exception is java.lang.IllegalArgumentException: No enum constant com.diabetes.user.domain.User.GenderType.
2023-04-18 09:07:31.420 DEBUG 1035884 --- [nio-8080-exec-6] o.a.c.loader.WebappClassLoaderBase       :     --> Returning ClassNotFoundException
2023-04-18 09:07:31.420 ERROR 1035884 --- [nio-8080-exec-6] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: No enum constant com.diabetes.user.domain.User.GenderType.; nested exception is java.lang.IllegalArgumentException: No enum constant com.diabetes.user.domain.User.GenderType.] with root cause
java.lang.IllegalArgumentException: No enum constant com.diabetes.user.domain.User.GenderType.
    at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137) ~[spring-tx-5.3.23.jar!/:5.3.23]
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122) ~[spring-security-web-5.7.3.jar!/:5.7.3]
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116) ~[spring-security-web-5.7.3.jar!/:5.7.3]


2023-04-18 09:09:36.829 DEBUG 1035884 --- [nio-8080-exec-4] .m.m.a.ExceptionHandlerExceptionResolver : Using @ExceptionHandler com.diabetes.common.exception.GlobalExceptionHandler#handleCustomApiException(CustomApiException, WebRequest)
2023-04-18 09:09:36.830 DEBUG 1035884 --- [nio-8080-exec-4] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [com.diabetes.common.exception.NoSuchElementFoundException: NOT FOUND ITEM]
2023-04-18 09:09:58.666 DEBUG 1035884 --- [nio-8080-exec-4] .m.m.a.ExceptionHandlerExceptionResolver : Using @ExceptionHandler com.diabetes.common.exception.GlobalExceptionHandler#handleCustomApiException(CustomApiException, WebRequest)
2023-04-18 09:09:58.667 DEBUG 1035884 --- [nio-8080-exec-4] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [com.diabetes.common.exception.NoSuchElementFoundException: NOT FOUND ITEM]
2023-04-18 09:11:19.096 DEBUG 1035884 --- [nio-8080-exec-9] o.s.web.servlet.DispatcherServlet        : Failed to complete request: org.springframework.dao.InvalidDataAccessApiUsageException: No enum constant com.diabetes.user.domain.User.GenderType.; nested exception is java.lang.IllegalArgumentException: No enum constant com.diabetes.user.domain.User.GenderType.
2023-04-18 09:11:19.098 DEBUG 1035884 --- [nio-8080-exec-9] o.a.c.loader.WebappClassLoaderBase       :     --> Returning ClassNotFoundException
2023-04-18 09:11:19.098 ERROR 1035884 --- [nio-8080-exec-9] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: No enum constant com.diabetes.user.domain.User.GenderType.; nested exception is java.lang.IllegalArgumentException: No enum constant com.diabetes.user.domain.User.GenderType.] with root cause
java.lang.IllegalArgumentException: No enum constant com.diabetes.user.domain.User.GenderType.
    at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137) ~[spring-tx-5.3.23.jar!/:5.3.23]
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122) ~[spring-security-web-5.7.3.jar!/:5.7.3]
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116) ~[spring-security-web-5.7.3.jar!/:5.7.3]

피드백~, 수정 완~,