Skip to content

fix: Lecture 좋아요 로직 constant 에러 발생 #26

Description

@doma17

문제 상황

Lecture API의 like 로직이 작동하지 않는 것을 아래 스크린샷을 통해 확인할 수 있습니다.

Image

원인 파악

서버 로그 상에서는 Exception 메세지가 : 'No enum constant inu.codin.codin.domain.lecture.entity.Evaluation.절대평가' 라고 남습니다.
enum constant 에러인것 같습니다.

Image

현재 Lecture API의 like 기능은 Feign Request로 Main API의 like 기능에 의존성이 있습니다.

하지만, 아래와 같이 Main API 의 like 기능을 테스트해 본 결과 이상 없음을 알 수 있습니다.

Image

로컬 테스트

  • Lecture API 'like' 엔드포인트 호출시 로그
Image
  • Main API 로그
Image

위와 같이 로컬 환경에서는 Lecture API에서 'like' 엔드포인트 호출시 아무런 이상이 없는 것을 확인할 수 있습니다.

배포환경 추가적인 오류 확인

과목 상세보기 엔드포인트에서 똑같은 에러가 발생하는 것을 알 수 있습니다.

특이하게 배포 환경에서만 발생하는 이유를 찾지는 못했습니다.
하지만, 한글로 저장된 DB 내용이 JPA를 통한 호출시에 enum type의 불일치 때문에 발생하는 문제인 점을 확인할 수 있었습니다.

Image Image
  • 배포 서버 로그
Image

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions