optimize site generation

This commit is contained in:
Krrish Ghimire
2026-07-10 15:20:25 +05:45
parent a3f9cef883
commit e705f240d4
3 changed files with 119 additions and 44 deletions

View File

@@ -1,6 +1,7 @@
package com.krrishg.config;
import io.jsonwebtoken.JwtException;
import org.apache.catalina.connector.ClientAbortException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
@@ -35,6 +36,13 @@ public class GlobalExceptionHandler {
return ProblemDetail.forStatusAndDetail(HttpStatus.BAD_REQUEST, message);
}
@ExceptionHandler(ClientAbortException.class)
public void handleClientAbort(ClientAbortException ex) {
if (log.isDebugEnabled()) {
log.debug("Client disconnected: {}", ex.getMessage());
}
}
@ExceptionHandler(Exception.class)
public ProblemDetail handleGeneral(Exception ex) {
log.error("Unhandled exception", ex);