diff --git a/animation.mjs b/animation.mjs index 09bd219..7934c60 100644 --- a/animation.mjs +++ b/animation.mjs @@ -126,7 +126,13 @@ try { { width: BREITE, height: HOEHE, deviceScaleFactor: 1, mobile: false }); const laden = async adresse => { - await cdp.ruf("Page.navigate", { url: "http://127.0.0.1:4321/" + adresse }); + const antwort = await cdp.ruf("Page.navigate", { url: "http://127.0.0.1:4321/" + adresse }); + /* Laeuft PostGrid nicht auf 4321, laedt die Seite gar nicht. Ohne diese + Pruefung hiess das spaeter nur "kennt keine Animationen". */ + if (antwort && antwort.errorText) { + throw new Error("PostGrid ist unter http://127.0.0.1:4321/ nicht erreichbar (" + + antwort.errorText + "). PostGrid mit ./serve.sh starten und den Post dort oeffnen."); + } await new Promise(r => setTimeout(r, 4000)); };