Skip to content

결제 계산 경계값 및 입력 검증 오류 수정 - #11

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
pikiland/fix-844c41f6415cc62ed4679e28df99a8ee72f3db7844532307db0fea144dec7538
Open

결제 계산 경계값 및 입력 검증 오류 수정#11
github-actions[bot] wants to merge 1 commit into
mainfrom
pikiland/fix-844c41f6415cc62ed4679e28df99a8ee72f3db7844532307db0fea144dec7538

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

배경

프로덕션 로그에서 결제 처리 중 Cannot read properties of undefined (reading 'processPayment') 예외가 관측되었습니다. 저장소의 결제 및 라우팅 코드에서 경계값 오류와 예외 처리 취약점이 함께 확인되어, 결제 흐름이 비정상 상태로 이어질 가능성이 있습니다.

수정 내용

  • src/modules/paymentGateway.js
    • GOLD 등급의 할인 경계값을 > 1000에서 >= 1000으로 수정
    • tierLevel이 배열 범위를 벗어나지 않도록 보정
    • 수수료 반환값을 소수 둘째 자리로 정규화
  • src/modules/apiRouter.js
    • 검증 실패를 400으로 응답하도록 변경
    • err.errors에 무조건 의존하던 코드를 제거하고, ValidationError 기준의 상세 메시지를 생성

기대 효과

  • 결제 금액 계산이 경계값에서 틀어지는 문제를 줄입니다.
  • 잘못된 입력이 들어와도 서비스가 2차 예외로 무너지는 일을 줄입니다.
  • 상위 흐름에서 결제 예외가 더 일관된 형태로 전달됩니다.

참고

TypeError: Cannot read properties of undefined (reading 'processPayment')

이 오류 자체는 결제 객체 주입/초기화 문제일 수 있으므로, 결제 모듈 외에 호출부도 함께 점검이 필요합니다.

PikiLand Incident Fingerprint: 844c41f6415cc62ed4679e28df99a8ee72f3db7844532307db0fea144dec7538


🔍 원본 에러 로그 및 발생 Context 보기
2026-08-07T11:12:06.491Z ERROR [http-worker-pool] UnhandledException: TypeError: Cannot read properties of undefined (reading 'processPayment')

Authored by PikiLand Engine

@grabic1060 grabic1060 closed this Aug 7, 2026
@grabic1060 grabic1060 reopened this Aug 7, 2026
@github-actions
github-actions Bot force-pushed the pikiland/fix-844c41f6415cc62ed4679e28df99a8ee72f3db7844532307db0fea144dec7538 branch from 0a97254 to ce757d0 Compare August 7, 2026 13:24
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.

1 participant