fix: ArtUpdateRequest에서 알 수 없는 JSON 필드 무시 처리#25
Draft
Jeongho0805 wants to merge 1 commit into
Draft
Conversation
PRACTICKET-4T: 클라이언트가 width 등 미정의 필드를 포함해 PUT /api/arts/{artId} 요청 시 UnrecognizedPropertyException 발생
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.
변경 사항
ArtUpdateRequest에@JsonIgnoreProperties(ignoreUnknown = true)어노테이션 추가배경
Sentry 이슈 PRACTICKET-4T:
PUT /api/arts/{artId}엔드포인트에서 클라이언트가width등 DTO에 정의되지 않은 필드를 포함해 요청을 보낼 경우, Jackson이UnrecognizedPropertyException을 발생시켜HttpMessageNotReadableException(HTTP 400)으로 이어지는 문제가 발생하였다. 9회 발생, 4명의 사용자에게 영향을 미쳤다.ArtUpdateRequest에는title,pixelData두 필드만 정의되어 있으며, 글로벌JacksonConfig에 알 수 없는 필드 무시 옵션이 설정되어 있지 않아 클라이언트가 추가 필드를 보낼 때마다 요청이 실패하였다.