[KW-481] feat: grpc error http status to runtime status#19
Merged
coffeesigma merged 3 commits intodevelopfrom May 28, 2025
Hidden character warning
The head ref may contain hidden characters: "KW-481/feat/member-service-grpc-error-util-\uc0dd\uc131"
Merged
[KW-481] feat: grpc error http status to runtime status#19coffeesigma merged 3 commits intodevelopfrom
coffeesigma merged 3 commits intodevelopfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a utility to convert application-specific error codes into gRPC runtime exceptions and applies it to the member service implementation.
- Adds
GrpcExceptionUtil.toStatusRuntimeExceptionto mapBaseErrorCodetoStatusRuntimeExceptionwith metadata - Updates
MemberGrpcServiceImplto use the new gRPC exception utility instead ofCommonException
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/main/java/com/doubleo/memberservice/global/exception/GrpcExceptionUtil.java | New utility to convert BaseErrorCode into gRPC exceptions |
| src/main/java/com/doubleo/memberservice/domain/member/grpc/server/MemberGrpcServiceImpl.java | Swapped out CommonException for GrpcExceptionUtil error handling |
Comments suppressed due to low confidence (1)
src/main/java/com/doubleo/memberservice/global/exception/GrpcExceptionUtil.java:10
- This new utility method currently lacks unit tests to verify correct status code conversion and metadata population. Adding tests for various
BaseErrorCodeinputs would ensure reliability.
public static StatusRuntimeException toStatusRuntimeException(BaseErrorCode errorCode) {
src/main/java/com/doubleo/memberservice/global/exception/GrpcExceptionUtil.java
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔷 Jira Ticket ID
KW-481
📌 작업 내용 및 특이사항
📚 참고사항