Skip to content

Commit

Permalink
ALL-1948 Added JSON stringify to see error message of Load Balancer (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Hathoriel authored Jul 10, 2023
1 parent a9c58dd commit b158920
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/connector/tatum.connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
4 changes: 2 additions & 2 deletions src/service/rpc/generic/LoadBalancerRpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.`,
Expand Down

0 comments on commit b158920

Please sign in to comment.