THRIFT-5674: Catch and handle server implementation exceptions
Client: js:es6
diff --git a/tutorial/nodejs/NodeClientPromise.js b/tutorial/nodejs/NodeClientPromise.js
index 2cdc184..e6ff2d7 100644
--- a/tutorial/nodejs/NodeClientPromise.js
+++ b/tutorial/nodejs/NodeClientPromise.js
@@ -57,7 +57,7 @@
.then(function(message) {
console.log('Whoa? You know how to divide by zero?');
})
- .fail(function(err) {
+ .catch(function(err) {
console.log("InvalidOperation " + err);
});
@@ -74,7 +74,7 @@
.then(function(message) {
console.log('Check log: ' + message.value);
})
- .fin(function() {
+ .finally(function() {
//close the connection once we're done
connection.end();
});