Skip to content

feat: 예외 정의 및 처리 #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 5, 2024
Merged

feat: 예외 정의 및 처리 #109

merged 3 commits into from
Mar 5, 2024

Conversation

gitchannn
Copy link
Contributor

@gitchannn gitchannn commented Mar 5, 2024

주요 변경사항

✔️ 로그인 관련 에러

  • 로그인 필요 없이 사용할 수 있는 기능들에는 적용하지 않겠습니다.
  • 백엔드 코드 내 예외 ⇒ LoginException
  • 에러 코드 구분할 것 없이 401 Unauthorized
    • 아이디가 없는 경우, 아이디는 맞는데 비밀번호가 틀린 경우 구분하지 않습니다.
    • 인증이 만료된 경우, 인증이 valid 하지 않은, 권한이 없는 경우 역시 구분하지 않습니다.
    • 클라이언트에서는 그냥 로그인이 되지 않았다는 것만을 사용자에게 알려주고, 로그인 페이지로 redirect하면 될 것 같습니다.

✔️ 점역 관련 에러

  • 크게 외부 API 호출에서 예외가 발생한 경우, 그리고 백엔드 서버 내 파일 처리에서 예외가 발생한 경우로 나눌 수 있습니다.
    • 외부 API 호출 TranscriptionException
      • OCR에서 예외가 발생한 경우
      • 점역 알고리즘에서 예외가 발생한 경우
    • 백엔드 서버 내부 FileException
      • 파일 처리에서 예외가 발생한 경우
  • pdf 파일 처리 과정에서 에러 발생 ⇒ 500 Internal Server Error error code=P
  • OCR API 호출 과정에서 에러 발생 ⇒ 500 Internal Server Error error code=O
  • Latex 파일 처리 과정에서 에러 발생 ⇒ 500 Internal Server Error error code=L
  • 점역 API 호출 과정에서 에러 발생 ⇒ 500 Internal Server Error error code=T
  • brf 파일 처리 과정에서 에러 발생 ⇒ 500 Internal Server Error error code=B

관련 이슈

closes #104

✔️ Squash & Merge 방식으로 병합해 주세요!

@gitchannn gitchannn self-assigned this Mar 5, 2024
@gitchannn gitchannn merged commit 7541003 into main Mar 5, 2024
@gitchannn gitchannn deleted the feature/104-exception branch March 5, 2024 08:13
@gitchannn gitchannn restored the feature/104-exception branch March 7, 2024 02:44
@gitchannn gitchannn deleted the feature/104-exception branch March 7, 2024 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: 에러 상황 정의 및 예외처리 + 예외 로깅
1 participant