Added sending error when RPC call fails