Skip to content

Commit 2a2abde

Browse files
rickydunlopjmdobry
authored andcommitted
Adding missing error parameter to callback (#156)
Also logs errors to the console.
1 parent b833d45 commit 2a2abde

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cloud-language/snippets/analyze.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,10 @@ if (require.main === module) {
165165
'Usage: node analyze.js <sentiment|entities|syntax> <text>');
166166
process.exit(1);
167167
}
168-
exports.main(args[0], args[1], function (result) {
168+
exports.main(args[0], args[1], function (err, result) {
169+
if (err) {
170+
console.error(err);
171+
}
169172
console.log(JSON.stringify(result, null, ' '));
170173
});
171174
}

0 commit comments

Comments
 (0)