Skip to content
This repository was archived by the owner on Jun 22, 2021. It is now read-only.

Commit 44da78c

Browse files
vcarlkalepail
andauthored
Fix incorrect example (#546)
* Fix incorrect example * Update transactions.md Co-authored-by: Tyler van der Hoeven <hi@tyvdh.com>
1 parent 409329b commit 44da78c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

guides/get-started/transactions.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ var transaction;
5555
// the transaction fee when the transaction fails.
5656
server.loadAccount(destinationId)
5757
// If the account is not found, surface a nicer error message for logging.
58-
.catch(StellarSdk.NotFoundError, function (error) {
59-
throw new Error('The destination account does not exist!');
58+
.catch(function (error) {
59+
if (error instanceof StellarSdk.NotFoundError) {
60+
throw new Error('The destination account does not exist!');
61+
} else return error
6062
})
6163
// If there was no error, load up-to-date information on your account.
6264
.then(function() {

0 commit comments

Comments
 (0)