Skip to content

Commit a713dcf

Browse files
authored
Merge pull request #38 from FlipNoteTeam/feat/error-log
Feat: 예외 발생시 로그 뜨도록
2 parents e18a88b + 0c460a3 commit a713dcf

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/main/java/flipnote/group/api/advice/GlobalExceptionHandler.java‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77

88
import flipnote.group.domain.policy.BusinessException;
99
import flipnote.group.global.response.ApiResponse;
10+
import lombok.extern.slf4j.Slf4j;
1011

12+
@Slf4j
1113
@RestControllerAdvice
1214
public class GlobalExceptionHandler {
1315

@@ -19,6 +21,7 @@ public ResponseEntity<ApiResponse<Void>> handle(BusinessException e) {
1921

2022
@ExceptionHandler(Exception.class)
2123
public ResponseEntity<ApiResponse<Void>> handle(Exception e) {
24+
log.error("handle", e);
2225
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(ApiResponse.internalError());
2326
}
2427
}

0 commit comments

Comments
 (0)