diff --git a/app/main.py b/app/main.py index 777328a..e857f53 100644 --- a/app/main.py +++ b/app/main.py @@ -1679,10 +1679,15 @@ def session_view_page(session_id: str, request: Request, user: User = Depends(re if (r.ok) {{ const data = await r.json(); if (data.ready) {{ - const f = document.getElementById('app-frame'); - f.src = iframeSrc; - f.style.display = ''; - return; + try {{ + const probe = await fetch(iframeSrc, {{method:'HEAD', credentials:'include'}}); + if (probe.status < 500) {{ + const f = document.getElementById('app-frame'); + f.src = iframeSrc; + f.style.display = ''; + return; + }} + }} catch(e) {{}} }} }} }} catch(e) {{}}