Skip to content

Commit

Permalink
Update to avoid catching ClientAbortException (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hank-Choi authored Feb 7, 2025
1 parent 2f9877b commit 6e1e478
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.wafflestudio.truffle.sdk.core.protocol.TruffleException
import com.wafflestudio.truffle.sdk.core.protocol.TruffleLevel
import jakarta.servlet.http.HttpServletRequest
import jakarta.servlet.http.HttpServletResponse
import org.apache.catalina.connector.ClientAbortException
import org.springframework.core.annotation.Order
import org.springframework.web.server.ResponseStatusException
import org.springframework.web.servlet.HandlerExceptionResolver
Expand All @@ -19,7 +20,7 @@ class TruffleHandlerExceptionResolver(private val hub: IHub) : HandlerExceptionR
handler: Any?,
ex: Exception,
): ModelAndView? {
if (ex !is ResponseStatusException) {
if (ex !is ResponseStatusException && ex !is ClientAbortException) {
hub.captureEvent(
TruffleEvent(
level = TruffleLevel.FATAL,
Expand Down

0 comments on commit 6e1e478

Please sign in to comment.