Both...too much rock, too little open area, not enuff substrate depth, and not enuff tank.
Altho Cortez rays are small as far as rays go (about 16" as adults), they require a pretty good-sized setup. As an absolute bare minimum, for a single specimen, you might "get by" with a sparsely-scaped 72" x 24" footprint, such as a std 180 gal, but an 8' x 2' tank or larger is a lot better. Also realize that this fish hails from cooler waters, and may require a chiller if you can't keep the tank in the low mid-60's to low 70's.
HTH