From b15892036d6db49a670d4761d5cdee9fb551ecaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kotol?= Date: Mon, 10 Jul 2023 13:13:39 +0200 Subject: [PATCH] ALL-1948 Added JSON stringify to see error message of Load Balancer (#853) --- CHANGELOG.md | 4 ++++ package.json | 2 +- src/connector/tatum.connector.ts | 2 +- src/service/rpc/generic/LoadBalancerRpc.ts | 4 ++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64c6171d4e..02956e3d47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [1.5.6] - 2023.07.10 +### Changed +- Added JSON stringify to see error message in case of error to Loadbalancer + ## [1.5.5] - 2023.07.05 ### Changed - Fixed not working Solana RPC calls diff --git a/package.json b/package.json index c31fcdb7be..0f00490f8e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tatumcom/js", - "version": "1.5.5", + "version": "1.5.6", "description": "Tatum JS SDK", "author": "Tatum", "repository": "https://github.com/tatumio/tatum-js", diff --git a/src/connector/tatum.connector.ts b/src/connector/tatum.connector.ts index ab01552ad0..c12bf92142 100644 --- a/src/connector/tatum.connector.ts +++ b/src/connector/tatum.connector.ts @@ -78,7 +78,7 @@ export class TatumConnector { }) } catch (error) { if (verbose) { - console.warn(new Date().toISOString(), 'Error: ', error) + console.warn(new Date().toISOString(), 'Error: ', JSON.stringify(error)) } return Promise.reject(error) } diff --git a/src/service/rpc/generic/LoadBalancerRpc.ts b/src/service/rpc/generic/LoadBalancerRpc.ts index b44d5baf50..5e02548188 100644 --- a/src/service/rpc/generic/LoadBalancerRpc.ts +++ b/src/service/rpc/generic/LoadBalancerRpc.ts @@ -149,11 +149,11 @@ export class LoadBalancerRpc implements AbstractRpcInterface { server.failed = false server.lastBlock = Utils.parseStatusPayload(network, response) } else { - Utils.log({ id: this.id, message: `Failed to check status of ${server.node.url}.`, data: response }) + Utils.log({ id: this.id, message: `Failed to check status of ${server.node.url}. Error: ${JSON.stringify(response)}`}) server.failed = true } }).catch((e) => { - Utils.log({ id: this.id, message: `Failed to check status of ${server.node.url}.`, data: e }) + Utils.log({ id: this.id, message: `Failed to check status of ${server.node.url}. Error: ${JSON.stringify(e)}` }) Utils.log({ id: this.id, message: `Server ${server.node.url} will be marked as failed and will be removed from the pool.`,