Code example for DefaultResponseErrorHandler

0
 */ 
public class VndErrorResponseErrorHandler extends DefaultResponseErrorHandler { 
 
	private ResponseExtractor<VndErrors> errorExtractor; 
 
	public VndErrorResponseErrorHandler(List<HttpMessageConverter<?>> messageConverters) { 
		errorExtractor = new HttpMessageConverterExtractor<VndErrors>(VndErrors.class, messageConverters); 
	} 
 
	@Override 
	public void handleError(ClientHttpResponse response) throws IOException { 
		VndErrors error = null; 
		try { 
			error = errorExtractor.extractData(response); 
		} 
		catch (Exception e) { 
			super.handleError(response); 
		} 
		throw new SpringXDException(error); 
	}