diff --git a/troubleshooting/250804_happybell80_rb10508_micro배포.md b/troubleshooting/250804_happybell80_rb10508_micro배포.md index e93828a..f1d5cfc 100644 --- a/troubleshooting/250804_happybell80_rb10508_micro배포.md +++ b/troubleshooting/250804_happybell80_rb10508_micro배포.md @@ -121,4 +121,30 @@ docker compose up -d --build #### 교훈 추가 1. **API 변경 시 전체 확인**: 엔드포인트 변경 시 헬스체크 등 모든 참조 확인 2. **최신 도구 활용**: uv 같은 최신 도구로 개발 효율성 향상 -3. **일관성 유지**: Dockerfile과 Actions의 설정 일치 필수 \ No newline at end of file +3. **일관성 유지**: Dockerfile과 Actions의 설정 일치 필수 + +## 오후 3시 59분 + +### 프론트엔드-백엔드 API 호환성 문제 + +#### API 필드명 불일치 +- **문제**: 프론트엔드와 백엔드가 서로 다른 필드명 사용 + - frontend-customer: `{"text": "...", "user_id": "..."}` + - rb10508_micro: `{"message": "...", "user_id": "..."}` +- **증상**: 404 오류 및 필드 불일치로 인한 통신 실패 +- **분석**: + - 모든 기존 로빙 프로젝트(rb8001, rb10508_test, rb10408_test)가 `text` 사용 + - Slack API도 메시지 필드가 `text` +- **해결**: rb10508_micro의 MessageRequest 모델을 `message` → `text`로 변경 + +#### API 엔드포인트 경로 통일 +- **변경사항**: + 1. rb10508_micro: `/api/test/` → `/api/message` + 2. frontend-customer: `/api/dev/message` → `/api/message` + 3. frontend-customer: `/health` → `/api/health` +- **효과**: 프론트엔드와 백엔드 간 완전한 호환성 확보 + +#### 교훈 +1. **표준 준수**: 기존 시스템과의 일관성 유지 중요 +2. **필드명 통일**: 모든 프로젝트에서 동일한 필드명 사용 +3. **문서화**: API 변경사항은 README에 즉시 반영 \ No newline at end of file