if (content == null) {
// Throw explicitly rather than allow a later null reference as default mock
// transports return success codes with empty contents.
throw new IOException("Empty content from metadata token server request.");
}
return parser.parseAndClose(content, response.getContentCharset(), TokenResponse.class);
}
if (statusCode == HttpStatusCodes.STATUS_CODE_NOT_FOUND) {
throw new IOException(String.format("Error code %s trying to get security access token from"
+ " Compute Engine metadata for the default service account. This may be because"
+ " the virtual machine instance does not have permission scopes specified.",