diff --git a/scripts/network/network.js b/scripts/network/network.js index 219cf3114..e962c1fe6 100644 --- a/scripts/network/network.js +++ b/scripts/network/network.js @@ -153,6 +153,7 @@ export class RPCNodeNetwork extends Network { async #callRPC(api, isText = false) { const cRes = await this.#fetchNode(api); + if (!cRes.ok) throw new Error('Failed to call rpc'); const cResTxt = await cRes.text(); if (isText) return cResTxt; // RPC calls with filters might return empty string instead of empty JSON, diff --git a/scripts/network/network_manager.js b/scripts/network/network_manager.js index c12981b0b..c180b690d 100644 --- a/scripts/network/network_manager.js +++ b/scripts/network/network_manager.js @@ -164,7 +164,11 @@ class NetworkManager { async sendTransaction(hex) { try { - const data = await this.#retryWrapper('sendTransaction', true, hex); + const data = await this.#retryWrapper( + 'sendTransaction', + false, + hex + ); // Throw and catch if the data is not a TXID if (!data.result || data.result.length !== 64) throw data;