When sending transactions using ethers.js to the Hedera testnet, and one errors, I can catch it like so:
} catch (error) {
if (error instanceof Error) console.log(error.message);
else console.log(error);
}
And the output looks like this:
[Request ID: ed2b0630-b17d-4e64-82e8-f7aea3196f82] Unknown error invoking RPC
The text Unknown error invoking RPC
is not particularly useful here,
however, I can use ed2b0630-b17d-4e64-82e8-f7aea3196f82
is useful when contacting support,
as that enables detailed retrieval of the error logs.
However, in cases of intermittently errors, where the same transaction results in an error sometimes, and other times it succeeds, I have been asked to provide the request ID of the one that succeeded. However I'm not sure how to do this using ethers.js. I suspect it needs extraction of low level RPC responses, but not sure if this is possible from ethersjs, and if so how?