diff --git a/apps/client/src/services/render.tsx b/apps/client/src/services/render.tsx index 682efa8871..31450b3a82 100644 --- a/apps/client/src/services/render.tsx +++ b/apps/client/src/services/render.tsx @@ -18,6 +18,10 @@ async function render(note: FNote, $el: JQuery, onError?: ErrorHand for (const renderNoteId of renderNoteIds) { const bundle = await server.postWithSilentInternalServerError(`script/bundle/${renderNoteId}`); + if (!bundle) { + throw new Error(`Script note '${renderNoteId}' could not be loaded. It may be protected and require an active protected session.`); + } + const $scriptContainer = $("
"); $el.append($scriptContainer);