antiwork/gumroad · error · ResponseError
The preview couldn't be loaded.
Error message
The preview couldn't be loaded.
What it means
Error "The preview couldn't be loaded." thrown in antiwork/gumroad.
Source
Thrown at app/javascript/data/agent.ts:168
method: "POST",
accept: "json",
url: Routes.internal_agent_custom_html_preview_path(),
data: {
endpoint: proposedActionEndpoint(action),
...(typeof body === "object" && body !== null ? body : {}),
},
});
const json = typia.assert<CustomHtmlPreviewResponse>(await response.json());
if (!json.success) throw new ResponseError(json.error);
// The POST staged the document, but the iframe's own GET is a separate request that can still
// miss (say, the staged document expired or was evicted). Probe the URL before reporting the
// preview loaded — the card enables Confirm on that signal, and it must never enable it while
// the iframe is about to render the "preview expired" notice instead of the proposed page.
// The probe-then-load window itself is not worth guarding: the token was staged moments ago,
// so it sits a full TTL away from expiry and newest in the seller's eviction order — losing it
// mid-window would take a burst of further stagings by the same seller within milliseconds.
const probe = await request({ method: "HEAD", accept: "html", url: json.preview_url });
if (!probe.ok) throw new ResponseError("The preview couldn't be loaded.");
return json.preview_url;
};
// One persisted message of a stored conversation, as returned by the conversations endpoint. The
// server keeps each turn's structured extras (proposed-action card, object cards, applied status)
// so the chat re-renders history exactly as it looked live.
export type ConversationMessage = {
role: ChatRole;
content: string;
proposed_action?: ProposedAction | null;
proposal_message_id?: string | null;
objects?: DisplayObject[] | null;
action_status?: "executing" | "applied" | "unknown" | "dismissed" | null;
};
export type Conversation = {
id: string;
title: string | null;View on GitHub (pinned to afeacbd394)
When it happens
Trigger: Thrown at app/javascript/data/agent.ts:168 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of antiwork/gumroad@afeacbd394 (2026-08-21).
Data as JSON: /api/errors/ec4b0939bc96a617.
Report an issue: GitHub.