From c3d66d2eec27ae8e6e96ad705e706b0920b6bdb5 Mon Sep 17 00:00:00 2001 From: Chandler May Date: Sun, 18 Dec 2022 14:10:53 -0500 Subject: THRIFT-5674: Catch and handle server implementation exceptions Client: js:es6 --- tutorial/nodejs/NodeClientPromise.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tutorial') diff --git a/tutorial/nodejs/NodeClientPromise.js b/tutorial/nodejs/NodeClientPromise.js index 2cdc184f9..e6ff2d7f4 100644 --- a/tutorial/nodejs/NodeClientPromise.js +++ b/tutorial/nodejs/NodeClientPromise.js @@ -57,7 +57,7 @@ client.calculate(1, work) .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 @@ client.calculate(1, work) .then(function(message) { console.log('Check log: ' + message.value); }) - .fin(function() { + .finally(function() { //close the connection once we're done connection.end(); }); -- cgit v1.2.1