File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/main/kotlin/com/depromeet/makers/config Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11package com.depromeet.makers.config
22
33import com.depromeet.makers.domain.exception.DomainException
4+ import com.depromeet.makers.domain.exception.ErrorCode
45import com.depromeet.makers.presentation.web.dto.response.ErrorResponse
56import org.springframework.http.HttpStatus
67import org.springframework.http.ResponseEntity
@@ -23,7 +24,8 @@ class WebExceptionHandler {
2324 @ExceptionHandler
2425 fun handleUnhandledException (e : Exception ): ResponseEntity <ErrorResponse > {
2526 e.printStackTrace()
26- return ResponseEntity .status(HttpStatus .INTERNAL_SERVER_ERROR )
27- .body(ErrorResponse (0 , " " ))
27+ return ResponseEntity
28+ .status(HttpStatus .INTERNAL_SERVER_ERROR )
29+ .body(ErrorResponse (ErrorCode .INTERNAL_ERROR .code, ErrorCode .INTERNAL_ERROR .message))
2830 }
2931}
You can’t perform that action at this time.
0 commit comments