debug: GlobalExceptionHandler 에 root cause 임시 노출
Build & Deploy to K8s / build-and-deploy (push) Successful in 4m31s
Build & Deploy to K8s / build-and-deploy (push) Successful in 4m31s
POST /api/ai-agents 가 500 만 반환하고 backend pod logs 직접 접근이 불가하여 진단 불가. 임시로 응답 message 에 [DEBUG] prefix + 예외 클래스명/메시지/cause 를 포함시켜 ULTRAQA 사이클로 root cause 파악. ⚠️ TEMPORARY — 안정화 후 다음 commit 에서 즉시 원복. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -33,7 +33,13 @@ public class GlobalExceptionHandler {
|
||||
public ResponseEntity<ApiResponse<Void>> handleException(Exception e,
|
||||
HttpServletRequest request) {
|
||||
log.error("Unhandled exception", e);
|
||||
// QA 진단 임시 — root cause class + message 노출 (안정화 후 원복 예정)
|
||||
String detail = e.getClass().getSimpleName() + ": " + (e.getMessage() != null ? e.getMessage() : "no message");
|
||||
Throwable cause = e.getCause();
|
||||
if (cause != null) {
|
||||
detail += " | caused by " + cause.getClass().getSimpleName() + ": " + cause.getMessage();
|
||||
}
|
||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
|
||||
.body(ApiResponse.error("서버 내부 오류가 발생했습니다.", request.getRequestURI()));
|
||||
.body(ApiResponse.error("[DEBUG] " + detail, request.getRequestURI()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user