Skip to content

Commit

Permalink
Merge pull request #1290 from navikt/fix_main
Browse files Browse the repository at this point in the history
AsyncRequestNotUsableException is now handled in Spring Framework (si…
  • Loading branch information
oyvind-wedoe authored Dec 16, 2024
2 parents fc639e4 + b19e087 commit 6698e1d
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import org.springframework.http.ProblemDetail
import org.springframework.web.bind.annotation.ExceptionHandler
import org.springframework.web.bind.annotation.RestControllerAdvice
import org.springframework.web.context.request.NativeWebRequest
import org.springframework.web.context.request.async.AsyncRequestNotUsableException
import org.springframework.web.reactive.function.client.WebClientResponseException
import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler

Expand All @@ -22,15 +21,6 @@ class ProblemHandlingControllerAdvice : ResponseEntityExceptionHandler() {
private val secureLogger = getSecureLogger()
}

@ExceptionHandler
fun handleAsyncRequestNotUsableException(
ex: AsyncRequestNotUsableException,
request: NativeWebRequest
) {
//Log in regular logs instead of secure logs to make it easier to compare with other suppressed logs
ourLogger.debug("Suppressing AsyncRequestNotUsableException. This is probably due to lost client during async/SSE operations.", ex)
}

@ExceptionHandler
fun handleSizeLimitExceededException(
ex: AttachmentTooLargeException,
Expand Down

0 comments on commit 6698e1d

Please sign in to comment.