Quote#schedule_apply! logs validation errors as ERROR — missing exception filtering
Summary: [Quote][GYVGXJU55F] Quote application failed: Billable already has a scheduled quote
결과#
Quote#apply!에 rescue Cupix::Errors::Billing => warn 절을 삽입하여 입력 검증성 예외(BILL10000 계열)만 warn으로 로깅하고 무결성/시스템 오류는 여전히 error로 유지. Validator 1회 APPROVED. 후속 조율 필요 항목(스케줄 취소 API, 응답 개선)은 별도 트랙으로 남김.
Pull Requests#
| Repo | PR | Branch |
|---|---|---|
| tesla | https://dev.azure.com/cupix/tesla/_git/tesla/pullrequest/89075 | feature/TSLA-13689 |
변경 내용#
app/models/quote.rb:Quote#apply!의rescue Cupix::Errors::Parameter뒤·rescue StandardError앞에rescue Cupix::Errors::Billing => e; Cupix::Logger.warn(...); raise e3줄 추가.spec/models/quote_spec.rb:apply!가Cupix::Errors::Billing을 raise할 때Cupix::Logger.warn호출·error미호출을 검증하는 example, non-billingStandardError경로가Cupix::Logger.error로 로깅되는지 회귀 방지 example 추가.
Follow-up (자동 code-fix 대상 아님, 조율 필요)#
- 스케줄 취소/교체 admin API 신설 검토 (
billable.scheduled_quote_id를 다른 Quote로 교체하는 경로 부재). PUT /api/v1/admin/quotes/{id}/apply응답의error.reason에 기존 스케줄 quotenumber및scheduled_billing_started_at노출 → Retool UI 개선.- back-office / accounting 담당자에게 Workspace 530 상황 및 재시도 대신 취소 절차 안내 (운영/CS 트랙).
Cleanup#
bash
cd $REPOS_DIR/tesla
git worktree remove /home/ec2-user/error-sweeper/.worktrees/79f45086-41ca-4b4c-8307-5dc5101d4294/tesla
git branch -D feature/TSLA-13689 # 로컬 브랜치가 남아있을 경우