// Superclass method barfs with a NullPointerException because it
// expects a WWW-Authenticate header that isn't there, so override
// it.
@Override protected void handleErrorResponse() throws ServiceException, IOException {
if (httpConn.getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED) {
throw new SessionExpiredException("Got response code " + httpConn.getResponseCode()
+ ", token has probably expired");
}
super.handleErrorResponse();
}
};