private void handleServerErrors(HttpStatus statusCode) throws IOException { if (statusCode == HttpStatus.INTERNAL_SERVER_ERROR) { throw new InternalServerErrorException("twitter", "Something is broken at Twitter. Please see http://dev.twitter.com/pages/support to report the issue."); } else if (statusCode == HttpStatus.BAD_GATEWAY) { throw new ServerDownException("twitter", "Twitter is down or is being upgraded."); } else if (statusCode == HttpStatus.SERVICE_UNAVAILABLE) { throw new ServerOverloadedException("twitter", "Twitter is overloaded with requests. Try again later."); } }
private void handleServerErrors(HttpStatus statusCode) throws IOException { if (statusCode == HttpStatus.INTERNAL_SERVER_ERROR) { throw new InternalServerErrorException("twitter", "Something is broken at Twitter. Please see http://dev.twitter.com/pages/support to report the issue."); } else if (statusCode == HttpStatus.BAD_GATEWAY) { throw new ServerDownException("twitter", "Twitter is down or is being upgraded."); } else if (statusCode == HttpStatus.SERVICE_UNAVAILABLE) { throw new ServerOverloadedException("twitter", "Twitter is overloaded with requests. Try again later."); } }
private void handleServerErrors(HttpStatus statusCode) throws IOException { if (statusCode == HttpStatus.INTERNAL_SERVER_ERROR) { throw new InternalServerErrorException( "Something is broken at Weibo."); } else if (statusCode == HttpStatus.BAD_GATEWAY) { throw new ServerDownException("Weibo is down or is being upgraded."); } else if (statusCode == HttpStatus.SERVICE_UNAVAILABLE) { throw new ServerOverloadedException( "Weibo is overloaded with requests. Try again later."); } }