From 96c16f5dd49a61fd185f9477866d8b7a91ac586f Mon Sep 17 00:00:00 2001 From: Ulysse Cura Date: Tue, 10 Mar 2026 21:07:48 +0100 Subject: [PATCH] WebTransportError now implemented correctly --- scripts/session_startup_animation.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/session_startup_animation.js b/scripts/session_startup_animation.js index 8d493f4..10bc4c5 100644 --- a/scripts/session_startup_animation.js +++ b/scripts/session_startup_animation.js @@ -20,14 +20,18 @@ async function sessionStartupAnimation() let all_default_elements = document.body.querySelectorAll("*"); all_default_elements.forEach((elem) => elem.style.opacity = 0); + // Get quotes possibilities + // Not the most optimised way, but it's working let xmlhttp = new XMLHttpRequest(); - // Not the most optimised way, but it's working xmlhttp.open("GET", "assets/startup_quotes.json", false); xmlhttp.send(); if(xmlhttp.status != 200) { - throw WebTransportError("The file 'assets/startup_quots.json' is not available"); + throw new WebTransportError({ + message: "The file 'assets/startup_quotes.json' is not available", + streamErrorCode: xmlhttp.status + }); } let quotes = JSON.parse(xmlhttp.responseText)["quotes"];