Skip to content

refactor: 에러 메세지 수정 #201

Merged
Jjiggu merged 2 commits into
developfrom
feature/#186-payment-crud
Jul 31, 2025
Merged

refactor: 에러 메세지 수정 #201
Jjiggu merged 2 commits into
developfrom
feature/#186-payment-crud

Conversation

@Jjiggu
Copy link
Copy Markdown
Contributor

@Jjiggu Jjiggu commented Jul 31, 2025

작업 요약

  • 결제 정보 없는 경우 반환하는 에러 메시지 명확하게 변경

Issue Link

#186

문제점 및 어려움

해결 방안

Reference

Summary by CodeRabbit

  • 버그 수정
    • 매장 결제 정보가 없을 때 반환되는 메시지와 상태 코드가 개선되어, 이제 200 OK와 안내 메시지가 제공됩니다.
    • 매장 결제 정보 미존재 예외 발생 시, 보다 명확한 에러 메시지와 에러 코드가 반환됩니다.

@Jjiggu Jjiggu self-assigned this Jul 31, 2025
@Jjiggu Jjiggu added the refactor 리팩토링 label Jul 31, 2025
@Jjiggu Jjiggu merged commit 523e1cc into develop Jul 31, 2025
1 check passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jul 31, 2025

Warning

Rate limit exceeded

@Jjiggu has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 16 minutes and 38 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between baadb33 and e3fa454.

📒 Files selected for processing (3)
  • nowait-app-user-api/src/main/java/com/nowait/applicationuser/exception/GlobalExceptionHandler.java (3 hunks)
  • nowait-app-user-api/src/main/java/com/nowait/applicationuser/storepayment/controller/StorePaymentController.java (1 hunks)
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentNotFoundException.java (1 hunks)

Walkthrough

StorePayment 관련 예외 처리 및 컨트롤러 응답 로직이 개선되었습니다. StorePaymentNotFoundException에 대한 전역 예외 처리기가 추가되었고, 컨트롤러에서 결제 정보가 없을 때의 응답 메시지와 상태 코드가 변경되었습니다. 예외 메시지도 보다 명확하게 수정되었습니다.

Changes

Cohort / File(s) Change Summary
Global Exception Handling
nowait-app-user-api/src/main/java/com/nowait/applicationuser/exception/GlobalExceptionHandler.java
StorePaymentNotFoundException에 대한 예외 핸들러 추가, 상태코드 및 응답 메시지 지정, 관련 import 변경.
StorePayment Controller 응답 개선
nowait-app-user-api/src/main/java/com/nowait/applicationuser/storepayment/controller/StorePaymentController.java
결제 정보 미존재 시 204 No Content → 200 OK로 변경, 명시적 메시지 반환하도록 로직 수정.
StorePaymentNotFoundException 메시지 변경
nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentNotFoundException.java
예외 메시지를 STORE_PAYMENT_PARAMETER_EMPTY → STORE_PAYMENT_NOT_FOUND로 변경.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant StorePaymentController
    participant Service
    participant GlobalExceptionHandler

    Client->>StorePaymentController: GET /store-payment/{storeId}
    StorePaymentController->>Service: getStorePaymentByStoreId(storeId)
    Service-->>StorePaymentController: 결제 정보(Optional) 반환

    alt 결제 정보 존재
        StorePaymentController-->>Client: 200 OK + 결제 정보
    else 결제 정보 없음
        StorePaymentController-->>Client: 200 OK + "등록된 결제 정보가 없습니다." 메시지
    else 예외 발생 (StorePaymentNotFoundException)
        StorePaymentController-->>GlobalExceptionHandler: 예외 발생
        GlobalExceptionHandler-->>Client: 204 No Content + 에러 메시지 및 코드
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Suggested reviewers

  • HyemIin
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/#186-payment-crud

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 generate unit tests to generate unit tests for 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.

@github-actions github-actions Bot requested a review from HyemIin July 31, 2025 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant