def false_if_raises(f):
    """Return False if `f` raises an exception"""

    @wraps(f)
    async def wrapper(*args, **kwargs):
        try:
            res = await f(*args, **kwargs)
        except Exception:
            app_log.exception(f"Error checking {f.__name__}")
            res = False
        return res

    return wrapper
Return False if `f` raises an exception
binderhub/health.py