The code runs:
self.last_block_hash = result["rpc_request"][0]["result"]
But the actual result can be:
{
"rpc_request": [
{
"error": {
"code": "-32999",
"message": "'RPC rate limit exceeded'"
},
"id": "wP878",
"jsonrpc": "2.0"
}
]
}
Which causes an unexpected KeyError "result" which can be confusing.