Conversation
- 기업분석정보 진행중일 때 에러를 내리는 대신 status로 분기처리할 수 있도록 응답을 수정
There was a problem hiding this comment.
Pull request overview
기업분석정보(company insight)가 아직 생성되지 않았을 때 COMPANY_INSIGHT_NOT_READY 예외를 던지는 대신, 응답에 status를 포함해 프론트에서 상태 기반 분기 처리가 가능하도록 조회 응답을 조정합니다.
Changes:
GET /:correctionId/company-insight에서COMPANY_INSIGHT_NOT_READY예외를 제거하고 항상 DTO 응답 반환UpdateCompanyInsightResDTO에status: CorrectionStatus필드 추가- 관련 단위 테스트를 “throw” 기대에서 “status 포함 응답” 기대 형태로 수정
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/modules/portfolio-correction/presentation/portfolio-correction.controller.ts |
기업분석정보 조회 API의 Swagger 에러 응답에서 COMPANY_INSIGHT_NOT_READY 제거 |
src/modules/portfolio-correction/application/services/portfolio-correction.service.ts |
기업분석정보 조회 시 companyInsight === null일 때 예외 throw 제거 |
src/modules/portfolio-correction/application/services/portfolio-correction.service.spec.ts |
조회 동작 변경에 맞춰 테스트를 “응답(status 포함) 반환”으로 업데이트 |
src/modules/portfolio-correction/application/dtos/company-insight.dto.ts |
응답 DTO에 status를 추가하고 from() 매핑 반영 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 본 PR은 기업 분석 정보 조회 API의 응답 방식을 개선합니다. 기존에는 데이터가 준비되지 않았을 경우 에러를 반환했으나, 이를 상태값(status)을 포함한 정상 응답으로 변경함으로써 클라이언트 측에서 보다 유연하게 분기 처리를 할 수 있도록 설계했습니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request modifies the company insight retrieval process to return a status field instead of throwing an error when the insight is not ready. Key changes include adding the status field to the response DTO, updating the service logic to remove the exception, and adjusting the controller's error documentation and unit tests. Feedback was provided regarding the naming of UpdateCompanyInsightResDTO, suggesting a more generic name like CompanyInsightResDTO to better reflect its dual use for both retrieval and update operations.
| @ApiProperty({ enum: CorrectionStatus }) | ||
| status: CorrectionStatus; |
There was a problem hiding this comment.
❌ 문제: UpdateCompanyInsightResDTO 클래스명이 '수정' 응답임을 나타내고 있으나, 현재 '조회' API(getCompanyInsight)에서도 공통으로 사용되고 있습니다. status 필드가 추가되면서 단순 수정 결과 이상의 정보를 포함하게 되었으므로 네이밍이 부적절합니다.
✅ 제안: CompanyInsightResDTO와 같이 조회와 수정 시 공통으로 사용할 수 있는 범용적인 이름으로 변경하는 것을 권장합니다.
References
- 네이밍 컨벤션 준수 여부 확인 (우선순위 중간) (link)
- 기업분석정보 진행중일 때 에러를 내리는 대신 status로 분기처리할 수 있도록 응답을 수정
* Fix: 활동 블록 삭제 시 첨삭 연관 데이터를 정리하고 삭제하도록 로직 변경 (#377) * refactor: 활동 블록 삭제 시 첨삭 연관 데이터를 정리하고 삭제하도록 로직 변경 - 활동 블록 삭제를 막는 기존 검증 로직을 수정함. * refactor: 외부 포트폴리오 삭제 플로우 선검증/병렬삭제로 개선 - 제미나이 코드리뷰 반영 * Fix: 포트폴리오 조회 오류 해결 (#378) * fix: 포트폴리오 목록 조회에서 external 항목 제외 * refactor: 내부 portfolio compat API 경로 및 변환 계층 제거 - 더이상 사용하지 않는 레거시 경로를 정리함 * fix: internal 포트폴리오 단건 조회에서 external 포트폴리오 응답 지원 * refactor: 메서드 네이밍 명확화 - 제미나이 코드리뷰 반영 * refactor: internal 첨삭 조회 조율을 파사드로 이관해 서비스 의존성 분리 - 제미나이 코드리뷰 반영 - 포폴 첨삭 서비스가 포트폴리오서비스를 직접 의존하던 구조 수정 * Feat: 외부 포트폴리오 조회 응답에 status 및 originalFileName 추가 (#380) * fix: 외부 포트폴리오 조회 응답에 status 추가 및 스웨거 명세 정합화 - 기업정보분석 조회에 대해 409 응답 명세 누락 수정 - 외부 포트폴리오 조회 응답에 PdfExtractionStatus 추가 * feat: external-portfolio 파일명 저장/조회 로직 추가 - portfolio_correction에 파일이름 저장용 nullable 칼럼 추가 - 한글 파일명에 대한 인코딩/정규화 처리를 NFC로 통일 * refactor: 파일명 정규화 로직 유틸로 분리 및 정제 로직 추가 - 코파일럿 코드리뷰 반영 * Refactor: 기업분석정보 조회 응답 수정 (#382) - 기업분석정보 진행중일 때 에러를 내리는 대신 status로 분기처리할 수 있도록 응답을 수정
Summary
기업분석정보 진행중일 때 에러를 내리는 대신 status로 분기처리할 수 있도록 응답을 수정합니다.
Changes
Type of Change
해당하는 항목에 체크해주세요:
Target Environment
배포 대상 브랜치를 선택해주세요:
dev)main)Related Issues
관련 이슈를 연결해주세요:
Testing
테스트 방법을 작성해주세요:
Checklist
PR 생성 전 확인사항:
docs/development/CODE_STYLE.md)docs/development/GIT_CONVENTIONS.md)docs/development/NAMING_CONVENTIONS.md)pnpm run build)pnpm run lint)Screenshots (Optional)
UI 변경이 있다면 스크린샷을 첨부해주세요.
Additional Notes
리뷰어에게 전달할 추가 정보가 있다면 작성해주세요.