Wrap promises with try blocks

This commit is contained in:
Ross Savage
2024-02-06 20:25:50 +01:00
parent 0379597d5e
commit aec144693d
17 changed files with 275 additions and 145 deletions

View File

@@ -2,6 +2,10 @@ import { staticBackup } from '@breeztech/react-native-breez-sdk'
const exampleStaticBackup = async () => {
// ANCHOR: static-channel-backup
const backupData = await staticBackup({ workingDir: '<working directory>' })
try {
const backupData = await staticBackup({ workingDir: '<working directory>' })
} catch (err) {
console.error(err)
}
// ANCHOR_END: static-channel-backup
}