Repository navigation
fix: 개발자 요청 API의 null JSON 본문 500 오류 수정 - #271
Merged
Merged
Conversation
Owner
|
확인해보니 오류가 잘 해결됐고 테스트도 모두 통과했습니다. 회귀 테스트까지 추가해주셔서 감사합니다. CI 확인 후 병합하겠습니다. |
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.
변경 요약
POST /api/feedback/requests에 JSON 본문으로null을 보내면readJsonBody가null을 그대로 반환하고,normalizeInput에서raw.type접근 시 TypeError가 발생해 500DEVELOPER_REQUEST_SUBMIT_FAILED("Cannot read properties of null (reading 'type')")로 응답했습니다.MISSING_FEEDBACK_TITLE을 반환합니다.관련 이슈
체크리스트
npm run format:check통과npm run lint통과npm run typecheck통과npm test통과테스트 방법
tests/app/app-api-feedback.test.ts에null본문 케이스를 추가했습니다. 수정 전 코드에서는 이 테스트가expected 500 to be 400으로 실패하고, 수정 후 통과합니다.참고 사항
npm run check구성 명령(format:check, lint, lint:biome, typecheck, check:source-lines, test)을 Dockernode:24컨테이너에서 실행했고 모두 통과했습니다(테스트 3619개). 커버리지는 100% 임계값을 유지합니다.npm run build,wrangler dev는 실행하지 않았습니다.[])이나 숫자 등 다른 JSON 값은 기존에도 필수값 400으로 처리되어 동작이 바뀌지 않습니다.