I wonder if you should explicitly set `redis = null` in here so your middleware check below is always safe when anything in here fails.