File tree 2 files changed +11
-2
lines changed
api/src/main/kotlin/com/wafflestudio/snuttev
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import com.wafflestudio.snuttev.core.common.error.SnuttException
6
6
import jakarta.servlet.http.HttpServletRequest
7
7
import jakarta.servlet.http.HttpServletResponse
8
8
import jakarta.validation.ConstraintViolationException
9
+ import org.apache.catalina.connector.ClientAbortException
9
10
import org.springframework.http.HttpStatus
10
11
import org.springframework.http.ResponseEntity
11
12
import org.springframework.http.converter.HttpMessageNotReadableException
@@ -17,6 +18,9 @@ import org.springframework.web.bind.MissingServletRequestParameterException
17
18
import org.springframework.web.bind.annotation.ExceptionHandler
18
19
import org.springframework.web.bind.annotation.RestControllerAdvice
19
20
import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException
21
+ import java.io.IOException
22
+
23
+
20
24
21
25
@RestControllerAdvice
22
26
class ErrorHandler {
@@ -37,6 +41,11 @@ class ErrorHandler {
37
41
return ResponseEntity (HttpStatus .BAD_REQUEST )
38
42
}
39
43
44
+ @ExceptionHandler(ClientAbortException ::class )
45
+ fun handleIOException (ex : IOException ): ResponseEntity <Void > {
46
+ return ResponseEntity .status(HttpStatus .NO_CONTENT ).build()
47
+ }
48
+
40
49
@ExceptionHandler(
41
50
ObjectOptimisticLockingFailureException ::class ,
42
51
)
Original file line number Diff line number Diff line change @@ -47,8 +47,8 @@ subprojects {
47
47
implementation(" org.springframework.boot:spring-boot-starter-data-jpa" )
48
48
implementation(" org.springframework.boot:spring-boot-starter-data-mongodb" )
49
49
50
- implementation(" com.wafflestudio.truffle.sdk:truffle-spring-boot-starter:1.1.2 " )
51
- implementation(" com.wafflestudio.truffle.sdk:truffle-logback:1.1.2 " )
50
+ implementation(" com.wafflestudio.truffle.sdk:truffle-spring-boot-starter:1.1.4 " )
51
+ implementation(" com.wafflestudio.truffle.sdk:truffle-logback:1.1.4 " )
52
52
53
53
testImplementation(" org.springframework.boot:spring-boot-starter-test" )
54
54
testImplementation(" com.h2database:h2" )
You can’t perform that action at this time.
0 commit comments