fix:AI 분석 504 타임아웃 에러 처리 개선
- Controller: analyzeScreenshots()를 try-catch로 감싸 JSON 에러 응답 보장 - Frontend: api() 함수에서 HTML 응답(504/502 등) 감지 → 친절한 한글 에러 메시지 표시 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -84,7 +84,18 @@ public function analyze(Request $request): JsonResponse
|
||||
}
|
||||
}
|
||||
|
||||
$analysisData = $this->screenAnalysisService->analyzeScreenshots($paths);
|
||||
try {
|
||||
$analysisData = $this->screenAnalysisService->analyzeScreenshots($paths);
|
||||
} catch (\Exception $e) {
|
||||
\Illuminate\Support\Facades\Log::error('TutorialVideoController: 분석 예외', [
|
||||
'error' => $e->getMessage(),
|
||||
]);
|
||||
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'AI 분석 중 오류가 발생했습니다: ' . $e->getMessage(),
|
||||
], 500);
|
||||
}
|
||||
|
||||
if (empty($analysisData)) {
|
||||
return response()->json([
|
||||
|
||||
Reference in New Issue
Block a user