fix: add DNS propagation delay and frontend error feedback for tunnel recreation

- apps/api/src/services/tunnel.py: add 2-second sleep after discovering the
  tunnel URL to allow Cloudflare DNS edge propagation before returning
- apps/web/src/hooks/use-instance-actions.ts: show alert() with the backend
  error message when recreate tunnel fails, instead of silently swallowing
  errors

Quality gates: ruff clean, tsc clean
This commit is contained in:
2026-05-30 15:33:04 +02:00
parent 351e76c00d
commit b7396d58d2
2 changed files with 13 additions and 3 deletions
+10 -3
View File
@@ -127,10 +127,17 @@ export function useInstanceActions(
if (loadingSessionId === session.id) return;
setLoadingSessionId(session.id);
try {
await recreateInstanceTunnel(session.project_id, session.repository_id, session.id);
await recreateInstanceTunnel(
session.project_id,
session.repository_id,
session.id
);
await onRefresh();
} catch {
// ignore
} catch (err) {
const message =
(err as { response?: { data?: { detail?: string } } })?.response?.data
?.detail || "Failed to recreate tunnel";
alert(message);
} finally {
setLoadingSessionId(null);
}