Repository navigation
fix: report-chat 타임아웃으로 인한 오탐 실패 토스트 수정 - #50
Merged
Merged
Conversation
AI report-chat responses can take 30s+ (multi-tool agent chain), but the shared axios client used a 15s timeout for every request. The frontend aborted before the AI service replied and showed a generic failure toast even though the backend later completed with 200 OK.
jeongmin1999
self-requested a review
July 4, 2026 11:24
jeongmin1999
approved these changes
Jul 4, 2026
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.
문제
AI 리포트 챗봇에 메시지를 보내면 서버(AI 서비스)는 200 OK로 정상 응답하지만, 화면에는 "메시지 전송에 실패했습니다" 토스트가 뜨는 문제가 있었습니다.
원인
src/api/client.ts)는 모든 요청에 15초 타임아웃을 적용하고 있어, AI 응답이 오기 전에 요청이 클라이언트 측에서 강제 중단(ECONNABORTED)됩니다.ReportChatPanel.tsx의 에러 처리가 모든 에러를 구분 없이 잡아 동일한 실패 토스트를 띄우다 보니, 실제로는 AI가 정상 처리 중이었음에도 실패로 표시됐습니다.수정 내용
src/api/reports.ts:sendChatMessage요청에 개별 타임아웃 65초를 지정 (BE의 AI 서비스 타임아웃 60초 기준)src/components/common/ReportChatPanel.tsx:axios.isAxiosError(error) && error.code === 'ECONNABORTED'로 timeout 에러를 구분해, timeout일 때는 "AI 응답이 지연되고 있습니다. 잠시 후 새로고침해 확인해주세요" 메시지로 다르게 표시확인
npx tsc --noEmit통과