antiwork/gumroad · error · ResponseError
Something went wrong.
Error message
Something went wrong.
What it means
ResponseError ("Something went wrong.") is Gumroad's generic API-failure error. This line in createCover is the fallthrough throw when POST /links/:permalink/asset_previews (link_asset_previews_path) answers non-2xx (the success:false-with-200 path throws earlier at line 24 with the server's message). request() already maps 5xx/429/network errors elsewhere, so this throw means a 4xx: expired session (401), wrong permalink (404), or a bad payload (422) such as a signed_blob_id from an upload that never committed or a url the server could not fetch.
Source
Thrown at app/javascript/data/covers.ts:27
const response = await request({
method: "POST",
accept: "json",
url: Routes.link_asset_previews_path(permalink),
data: {
asset_preview:
coverPayload.type === "file" ? { signed_blob_id: coverPayload.signedBlobId } : { url: coverPayload.url },
},
});
if (response.ok) {
const responseData = typia.assert<
{ success: true; asset_previews: AssetPreview[] } | { success: false; error: string }
>(await response.json());
if (responseData.success) return responseData.asset_previews;
throw new ResponseError(responseData.error);
}
throw new ResponseError();
};
export const deleteCover = async (permalink: string, coverId: string) => {
const response = await request({
method: "DELETE",
accept: "json",
url: Routes.link_asset_preview_path(permalink, coverId),
});
if (response.ok) {
const responseData = typia.assert<{ success: true; asset_previews: AssetPreview[] } | { success: false }>(
await response.json(),
);
if (responseData.success) return responseData.asset_previews;
}
throw new ResponseError();
};View on GitHub (pinned to afeacbd394)
Solutions
- DevTools → Network: check the status of the POST .../asset_previews request.
- 401: reload the page to refresh the session and retry — the signed blob id survives a reload.
- 422: re-run the file upload flow to obtain a fresh signed_blob_id before calling createCover; do not reuse ids from failed uploads.
- For url covers, verify the URL is public and reachable (curl -I) — the server fetches it server-side.
Defensive patterns
Strategy: validation
Validate before calling
if (coverPayload.type === "file" && !coverPayload.signedBlobId)
throw new Error("Upload the image first — the cover payload has no file reference.");
if (coverPayload.type === "url" && !/^https?:\/\//.test(coverPayload.url))
throw new Error("Cover URL must start with http(s)://");
await createCover(permalink, coverPayload); Type guard
const isCoverPayload = (p: unknown): p is CoverPayload =>
typeof p === "object" && p !== null &&
((p as { type?: string }).type === "file" && typeof (p as { signedBlobId?: string }).signedBlobId === "string") ||
((p as { type?: string }).type === "url" && typeof (p as { url?: string }).url === "string"); Try / catch
import { assertResponseError } from "$app/utils/request";
try {
const previews = await createCover(permalink, coverPayload);
} catch (e) {
assertResponseError(e);
if (needsReauth()) { location.reload(); return; } // stale session is the common 401
showAlert("Couldn't save that cover. Re-upload the image and try again.", "error");
} Prevention
- Only call createCover with a signedBlobId from an upload step that completed successfully.
- For url covers, check the URL is public (curl -I) before submitting — the server fetches it.
- Save the editor soon after opening; long-idle sessions lose CSRF and every POST 401s.
When it happens
Trigger: Creating a cover with a signedBlobId from an interrupted direct upload (the ActiveStorage blob was never committed, so the server rejects the id); passing a cover url that 404s or is private, since the server mirrors it; seller session/CSRF expired while the product editor sat open; permalink mismatch after the product was renamed mid-session.
Common situations: Product editor left open overnight so every save 401s; very large cover images failing the upload step but the stale blob id still being submitted; pasted S3 presigned/expiring URLs as the cover source; two tabs editing the same product with one renaming it.
Related errors
- Something went wrong.
- Something went wrong.
- Something went wrong.
- Something went wrong.
- ${responseData.error}
AI-assisted analysis of antiwork/gumroad@afeacbd394 (2026-08-21).
Data as JSON: /api/errors/f915b9ff413e16df.
Report an issue: GitHub.