ErrorPageFilter
Hi , i have a controller which produces JSON and XML. allthough i dont use HTML ErrorPageFilter is throwing messages to log because the response was commited . it happens in handleErrorStatus function when i throw exception from my controller. i ended up disabling the ErrorPageFilter with :
@Bean
public FilterRegistrationBean filterRegistrationBean(ErrorPageFilter errorPageFilter) {
FilterRegistrationBean registrationBean = new FilterRegistrationBean();
registrationBean.setFilter(errorPageFilter);
registrationBean.setEnabled(false);
return registrationBean;
}
but i think spring boot should maybe detect that the response was not html and not use the filter at all ....
thanks.
Duplicates #2745