diff --git a/api/src/main/kotlin/com/mashup/dojo/common/ControllerExceptionAdvice.kt b/api/src/main/kotlin/com/mashup/dojo/common/ControllerExceptionAdvice.kt index 6f00efe..ef765c6 100644 --- a/api/src/main/kotlin/com/mashup/dojo/common/ControllerExceptionAdvice.kt +++ b/api/src/main/kotlin/com/mashup/dojo/common/ControllerExceptionAdvice.kt @@ -7,6 +7,7 @@ import org.springframework.http.HttpStatus import org.springframework.http.ResponseEntity import org.springframework.web.bind.annotation.ExceptionHandler import org.springframework.web.bind.annotation.RestControllerAdvice +import org.springframework.web.context.request.async.AsyncRequestTimeoutException private val log = KotlinLogging.logger {} @@ -24,6 +25,12 @@ class ControllerExceptionAdvice { return errorResponse(ex.httpStatusCode, ex.toApiErrorResponse()) } + @ExceptionHandler(AsyncRequestTimeoutException::class) + fun handleSseAsync(ex: DojoException): ResponseEntity> { + log.info { "Dojo eat AsyncRequestTimeoutException" } + return ResponseEntity(HttpStatus.OK) + } + private fun DojoException.toApiErrorResponse(): DojoApiErrorResponse = DojoApiErrorResponse(code = errorCode, message = message) private fun errorResponse(