Repository navigation
Conversation
jyx-07
force-pushed
the
feat/gateway-response-wrapper
branch
from
November 3, 2026 14:14
9eb3826 to
ed72d9c
Compare
jyx-07
changed the base branch from
develop
to
feat/gateway-circuit-breaker-status
November 3, 2026 14:14
jyx-07
force-pushed
the
feat/gateway-response-wrapper
branch
from
November 3, 2026 14:19
ed72d9c to
84caeed
Compare
cfcromn
reviewed
Nov 3, 2026
cfcromn
left a comment
There was a problem hiding this comment.
래핑 전후로 원본 값이나 HTTP 응답의 의미가 달라지는 경우 두 가지를 확인했습니다.
| status: HttpStatus, | ||
| body: ByteArray, | ||
| ): ByteArray? { | ||
| val node = if (body.isEmpty()) null else runCatching { objectMapper.readTree(body) }.getOrElse { return null } |
There was a problem hiding this comment.
서비스에서 1234567890.123456789를 반환하도록 테스트했는데, 게이트웨이를 거치면 1.2345678901234567E9로 바뀝니다. 표기뿐 아니라 실제 숫자 값도 달라져서 금액처럼 정밀도가 필요한 데이터에 영향이 있을 것 같아요. 소수를 BigDecimal로 읽도록 설정하고, 래핑 전후의 값이 유지되는지도 테스트해 보면 어떨까요?
Contributor
Author
| excludedPatterns.any { it.matches(pathContainer) } -> Decision.SKIP_EXCLUDED_PATH | ||
| requestHeaders.upgrade.equals("websocket", ignoreCase = true) -> Decision.SKIP_WEBSOCKET | ||
| method == HttpMethod.HEAD -> Decision.SKIP_NO_BODY | ||
| status == HttpStatus.NO_CONTENT || status == HttpStatus.NOT_MODIFIED -> Decision.SKIP_NO_BODY |
There was a problem hiding this comment.
206 부분 응답도 여기서 제외하는 게 좋겠습니다. 7바이트짜리 JSON 응답으로 확인해 보니 래핑 후 본문은 96바이트가 됐는데 Content-Range: bytes 0-6/20은 그대로 남았습니다. 범위 정보가 원본 본문 기준이라, 206이나 Content-Range가 있는 응답은 그대로 전달하는 쪽이 맞을 것 같습니다.
Contributor
Author
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.
개요
서비스의 JSON 응답과 게이트웨이가 만드는 오류를 모두
{status, code, message, data}공통 형식으로 맞춥니다.본문
ApiResponseWrapperFilter가 NettyWriteResponseFilter 직전에 서비스 JSON 응답을 감쌈 (성공은data, 오류는 원본code·message사용)ErrorResponse {code, message}를CommonApiResponse로 교체#10 → #12 → #13 → #14 → #15 → 이 PR 순서로 머지해 주세요. 클라이언트가 받는 응답 형식이 바뀌므로 프론트 확인이 필요합니다.