@trudb/tru-common-lib 0.0.482 → 0.0.483

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5617,11 +5617,17 @@ const connection = new signalR.HubConnectionBuilder()
5617
5617
  class TruConnectionHub {
5618
5618
  constructor() {
5619
5619
  this.start = async () => {
5620
- await connection.start();
5621
- console.log(`SignalR connection success! connectionId: ${connection.connectionId}`);
5622
- connection.on("change", (value) => {
5623
- console.log(JSON.parse(value));
5624
- });
5620
+ try {
5621
+ await connection.start().then(() => {
5622
+ console.log(`SignalR connection success! connectionId: ${connection.connectionId}`);
5623
+ connection.on("change", (value) => {
5624
+ console.log(JSON.parse(value));
5625
+ });
5626
+ });
5627
+ }
5628
+ catch (error) {
5629
+ console.log(`SignalR connection error: ${error}`);
5630
+ }
5625
5631
  };
5626
5632
  }
5627
5633
  }