try {
switch (httpConn.getResponseCode()) {
case HttpURLConnection.HTTP_MOVED_PERM:
case HttpURLConnection.HTTP_MOVED_TEMP:
throw new RedirectRequiredException(httpConn);
}
super.handleErrorResponse();
} catch (AuthenticationException e) {
// Throw a more specific exception for session expiration.
String msg = e.getMessage();