@Override
public List<Contact> getContactList() throws Exception {
LOG.info("Fetching contacts from " + CONTACTS_URL);
Response serviceResponse;
try {
serviceResponse = authenticationStrategy.executeFeed(CONTACTS_URL);
} catch (Exception e) {
throw new SocialAuthException("Error while getting contacts from "
+ CONTACTS_URL, e);
}
if (serviceResponse.getStatus() != 200) {
throw new SocialAuthException("Error while getting contacts from "
+ CONTACTS_URL + "Status : " + serviceResponse.getStatus());
}
String respStr;
try {
respStr = serviceResponse
.getResponseBodyAsString(Constants.ENCODING);
} catch (Exception exc) {
throw new SocialAuthException("Failed to read response from "
+ CONTACTS_URL, exc);
}