Skip to content

Commit 4c5129e

Browse files
committed
No more stacktraces on broken pipes
1 parent 684debe commit 4c5129e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/main/java/com/faforever/api/error/GlobalControllerExceptionHandler.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.faforever.api.error;
22

33
import lombok.extern.slf4j.Slf4j;
4+
import org.apache.catalina.connector.ClientAbortException;
45
import org.springframework.http.HttpStatus;
56
import org.springframework.security.access.AccessDeniedException;
67
import org.springframework.security.authentication.InsufficientAuthenticationException;
@@ -105,6 +106,11 @@ public ErrorResponse processAccessDeniedException(Throwable ex) throws MissingSe
105106
return response;
106107
}
107108

109+
@ExceptionHandler(ClientAbortException.class)
110+
public void warn(Throwable ex) {
111+
log.warn("Client aborted connection: {}", ex.getMessage());
112+
}
113+
108114
@ExceptionHandler(Exception.class)
109115
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
110116
@ResponseBody

0 commit comments

Comments
 (0)