diff --git a/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/src/main/java/com/baeldung/filters/ResponseLogFilter.java b/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/src/main/java/com/baeldung/filters/ResponseLogFilter.java index e589e27d46..1fdd89c7f7 100644 --- a/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/src/main/java/com/baeldung/filters/ResponseLogFilter.java +++ b/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/src/main/java/com/baeldung/filters/ResponseLogFilter.java @@ -49,8 +49,8 @@ public class ResponseLogFilter extends ZuulFilter { context.setResponseBody(responseData); } - catch (Throwable e) { - e.printStackTrace(); + catch (Exception e) { + logger.error("error occurred at response log filter", e); } return null;