Skip to content

[KW-481] feat: grpc error http status to runtime status#19

Merged
coffeesigma merged 3 commits intodevelopfrom
KW-481/feat/member-service-grpc-error-util-생성
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#19
coffeesigma merged 3 commits intodevelopfrom
KW-481/feat/member-service-grpc-error-util-생성

Conversation

@coffeesigma
Copy link
Contributor

@coffeesigma coffeesigma commented May 27, 2025

🔷 Jira Ticket ID

KW-481


📌 작업 내용 및 특이사항

  • toStatusRuntimeException 메서드 추가
  • grpc server 로직에 반영

📚 참고사항

@github-actions github-actions bot changed the title feat: grpc error http status to runtime status [KW-481] feat: grpc error http status to runtime status May 27, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.toStatusRuntimeException to map BaseErrorCode to StatusRuntimeException with metadata
  • Updates MemberGrpcServiceImpl to use the new gRPC exception utility instead of CommonException

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 BaseErrorCode inputs would ensure reliability.
public static StatusRuntimeException toStatusRuntimeException(BaseErrorCode errorCode) {

Copy link
Contributor

@willjsw willjsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!

@coffeesigma coffeesigma merged commit 557d958 into develop May 28, 2025
1 check passed
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.

3 participants