I feel it’d be easier to debug intermittent test failures if the error message is present in the logs instead of error code. So, switching order of error code and message in the try_rpc function to aid error debugging.
Should help in debugging #34354 IMO. It’s an intermittent failure on Windows that I can’t reproduce and it’s more difficult to figure out what could have gone wrong only by seeing the error code like below in the CI logs. Given that the functional tests pass, I don’t see a harm in checking for error message first and throwing it in case of a mismatch.
0AssertionError: Unexpected JSONRPC error code -1