Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
RocketChat.settings.get('GoogleNaturalLanguage_ServiceAccount', (key, value) => {
if (value) {
try {
languageClient = googleLanguage({
credentials: JSON.parse(value),
});
} catch (e) {
languageClient = null;
console.error('Error parsing Google Natural Language credential.', e);
}
}
});