Code example for DefaultResponseErrorHandler

0
/** 
 * Subclass of {@link DefaultResponseErrorHandler} that handles errors from Facebook's 
 * Graph API, interpreting them into appropriate exceptions. 
 * @author Craig Walls 
 */ 
class FacebookErrorHandler extends DefaultResponseErrorHandler {
 
	private final static Log logger = LogFactory.getLog(FacebookErrorHandler.class);
	private final static String FACEBOOK = "facebook";
 
	@Override 
	public void handleError(ClientHttpResponse response) throws IOException {
		Map<String, String> errorDetails = extractErrorDetailsFromResponse(response);
		if (errorDetails == null) {
			handleUncategorizedError(response, errorDetails);
		} 
		handleFacebookError(response.getStatusCode(), errorDetails);
		 
		// if not otherwise handled, do default handling and wrap with UncategorizedApiException 
		handleUncategorizedError(response, errorDetails);			
Contextual code suggestions in your IDE  Get Codota for Java