RNA surveillance is required for endoplasmic reticulum homeostasis