Skip to content

Commit

Permalink
feat: fix unhandled
Browse files Browse the repository at this point in the history
  • Loading branch information
ilinikh.a1 committed Oct 23, 2023
1 parent 7ad1af8 commit 40d6b0c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/bingx-socket/bingx-account-socket-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,15 @@ export class BingxAccountSocketStream {
new URL('/swap-market', 'wss://open-api-swap.bingx.com'),
};

this.connect(this.account, this.configuration.requestExecutor).catch(() => {
console.error('Cannot connect to account', this.account);
});
try {
this.connect(this.account, this.configuration.requestExecutor).catch(
() => {
console.error('Cannot connect to account', this.account);
},
);
} catch (e) {
console.error('Cannot connect to account error', this.account);
}
}

private async connect(
Expand Down

0 comments on commit 40d6b0c

Please sign in to comment.