} else {
try {
result = (T) DataSiftClient.MAPPER.readValue(s, instance.getClass());
} catch (IOException e) {
result.failed(e);
throw new JsonParsingException("Unable to decode JSON from DataSift response", e, response);
}
}
result.setResponse(new com.datasift.client.Response(s, response));
if (response.getStatus().code() == 401) {
throw new AuthException("Please provide a valid username and API key", response);