diff --git a/web_app/static/script.js b/web_app/static/script.js index 441a4ed..229021e 100644 --- a/web_app/static/script.js +++ b/web_app/static/script.js @@ -671,6 +671,10 @@ async function generatePoster() { showDownloadButton(imageUrl, data.filename); loadingOverlay.style.display = 'none'; }; + img.onerror = () => { + loadingOverlay.style.display = 'none'; + showToast("Error: Failed to load the generated poster image.", "error"); + }; } catch (error) { console.error("Generation failed", error);