Better RPC calls error handling