def is_url_on_site(app, url):
    
    try:
        # Will raise an exception if no endpoint exists for the url
        app.create_url_adapter(request).match(url)
    except NotFound:
        return False
    except HTTPException:
        # Any other exceptions are harmless (I think)
        pass
        
    return True
Determines if *app* can handle *url*, if this function returns False it
dataset/ETHPy150Open ucrcsedept/galah/galah/web/util.py/is_url_on_site