Wavelength-selective degradation of perovskite-based solar cells