Skip to content

Conversation

@Jjiggu
Copy link
Contributor

@Jjiggu Jjiggu commented Jul 1, 2025

작업 요약

store, menu custom exception 추가

Issue Link

#36

문제점 및 어려움

해결 방안

Reference

Summary by CodeRabbit

  • 신규 기능

    • 메뉴, 매장, 이미지 관련 입력값 누락 및 미존재 시 도메인별 맞춤 예외 메시지 제공
    • 메뉴/매장 이미지 파일이 비어있거나 없을 때, 상세한 예외 메시지 반환
    • 검색 파라미터 누락 시 구체적인 에러 메시지 추가
  • 버그 수정

    • 기존의 일반적인 예외를 도메인별 구체적인 예외로 변경하여 오류 상황을 명확하게 안내
  • 리팩터링

    • 입력값 유효성 검증 강화 및 예외 처리 일관성 개선
    • 중복된 패키지 스캔 및 엔티티 스캔 설정 정리
  • 문서화

    • 에러 메시지 Enum에 신규 에러 코드 및 메시지 추가

@Jjiggu Jjiggu self-assigned this Jul 1, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jul 1, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

이 변경사항은 메뉴와 매장 서비스 전반에 걸쳐 입력 파라미터와 엔티티 존재 여부에 대한 명확한 검증 및 도메인별 커스텀 예외를 도입합니다. 기존의 일반 예외를 도메인 특화 예외로 교체하고, 입력값이 null 또는 비어있을 때 명확한 예외를 발생시키도록 로직을 강화했습니다. 또한, 컴포넌트 스캔 범위가 확장되고, 관련 에러 메시지 상수가 추가되었습니다.

Changes

파일/경로 그룹 변경 요약
.../ApiAdminApplication.java, .../ApiUserApplication.java @SpringBootApplication의 스캔 패키지에 "com.nowait.config" 추가, 중복된 엔티티 스캔 패키지 제거
.../menu/service/MenuImageService.java, .../menu/service/MenuService.java, .../store/service/StoreImageService.java, .../store/service/StoreServiceImpl.java, .../user/menu/service/MenuService.java, .../user/store/service/StoreServiceImpl.java 입력 파라미터 null/empty 체크 추가, 기존 일반 예외를 도메인별 커스텀 예외(MenuNotFoundException, StoreNotFoundException 등)로 대체, 에러 처리 명확화
.../reservation/exception/ReservationNotFoundException.java 커스텀 예외 클래스 삭제
.../reservation/service/ReservationService.java 삭제된 예외의 import 제거, 그 외 로직 변경 없음
common/src/main/java/com/nowait/common/exception/ErrorMessage.java 메뉴, 매장, 이미지, 검색 관련 신규 에러 메시지 상수 추가
domain-menu/src/main/java/com/nowait/menu/exception/..., domain-store/src/main/java/com/nowait/store/exception/... 메뉴/매장/이미지/검색 파라미터 및 엔티티 존재 여부 관련 커스텀 런타임 예외 클래스 다수 신규 추가

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant Service
    participant Repository

    Client->>Service: 메뉴/매장 관련 메서드 호출(파라미터 포함)
    alt 파라미터 null/empty
        Service-->>Client: 도메인별 ParamEmptyException throw
    else 정상 파라미터
        Service->>Repository: 엔티티 조회
        alt 엔티티 없음
            Service-->>Client: 도메인별 NotFoundException throw
        else 엔티티 존재
            Service-->>Client: 정상 응답 반환
        end
    end
Loading

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • HyemIin

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between df24b36 and 3cbfb70.

📒 Files selected for processing (20)
  • application-admin/src/main/java/com/nowait/applicationadmin/ApiAdminApplication.java (1 hunks)
  • application-admin/src/main/java/com/nowait/applicationadmin/menu/service/MenuImageService.java (3 hunks)
  • application-admin/src/main/java/com/nowait/applicationadmin/menu/service/MenuService.java (5 hunks)
  • application-admin/src/main/java/com/nowait/applicationadmin/reservation/exception/ReservationNotFoundException.java (0 hunks)
  • application-admin/src/main/java/com/nowait/applicationadmin/reservation/service/ReservationService.java (0 hunks)
  • application-admin/src/main/java/com/nowait/applicationadmin/store/service/StoreImageService.java (4 hunks)
  • application-admin/src/main/java/com/nowait/applicationadmin/store/service/StoreServiceImpl.java (5 hunks)
  • application-user/src/main/java/com/nowait/applicationuser/ApiUserApplication.java (1 hunks)
  • application-user/src/main/java/com/nowait/applicationuser/menu/service/MenuService.java (3 hunks)
  • application-user/src/main/java/com/nowait/applicationuser/store/service/StoreServiceImpl.java (3 hunks)
  • common/src/main/java/com/nowait/common/exception/ErrorMessage.java (1 hunks)
  • domain-menu/src/main/java/com/nowait/menu/exception/MenuImageEmptyException.java (1 hunks)
  • domain-menu/src/main/java/com/nowait/menu/exception/MenuImageNotFoundException.java (1 hunks)
  • domain-menu/src/main/java/com/nowait/menu/exception/MenuNotFoundException.java (1 hunks)
  • domain-menu/src/main/java/com/nowait/menu/exception/MenuParamEmptyException.java (1 hunks)
  • domain-store/src/main/java/com/nowait/store/exception/StoreImageEmptyException.java (1 hunks)
  • domain-store/src/main/java/com/nowait/store/exception/StoreImageNotFoundException.java (1 hunks)
  • domain-store/src/main/java/com/nowait/store/exception/StoreKeywordEmptyException.java (1 hunks)
  • domain-store/src/main/java/com/nowait/store/exception/StoreNotFoundException.java (1 hunks)
  • domain-store/src/main/java/com/nowait/store/exception/StoreParamEmptyException.java (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Jjiggu Jjiggu merged commit 76d91a7 into develop Jul 1, 2025
1 of 2 checks passed
@github-actions github-actions bot requested a review from HyemIin July 1, 2025 08:14
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.

2 participants