code: def check_connection(func):
      
      @wraps(func)
      def with_exception_handling(*args, **kwargs):
          """Wrap function being decorated."""
          try:
              return func(*args, **kwargs)
          except redis.exceptions.ConnectionError:
              raise ConnectionError("Unable to connect to the Redis "
                                    "Configuration Database. host = {}, "
                                    "port = {}, id = {}."
                                    .format(REDIS_HOST, REDIS_PORT,
                                            REDIS_DB_ID))
      return with_exception_handling
docs: Check connection exceptions.