antiwork/gumroad · error · ResponseError

Something went wrong.

Error message

Something went wrong.

What it means

Gumroad's frontend data layer throws ResponseError (default message "Something went wrong.", defined in app/javascript/utils/request.ts:27) when an API call fails. This line in fetchCommunities fires when GET /integrations/circle/communities.json answers with a JSON body of { success: false }. The controller (app/controllers/integrations/circle_controller.rb:6-13) returns exactly that when the api_key param is blank or when the upstream CircleApi.get_communities call fails (invalid API key, Circle outage/timeout, or a non-array response), so this error means the Circle connection itself is broken, not the HTTP transport.

Source

Thrown at app/javascript/data/circle_integration.ts:26

type FetchCommunitiesSuccessResponse = { success: true; communities: CircleCommunity[] };

type FetchCommunitiesErrorResponse = { success: false };

type FetchSpaceGroupsSuccessResponse = { success: true; space_groups: CircleSpaceGroup[] };

type FetchSpaceGroupsErrorResponse = { success: false };

export const fetchCommunities = async (apiKey: string) => {
  const response = await request({
    method: "GET",
    url: Routes.communities_integrations_circle_index_path({ format: "json", api_key: apiKey }),
    accept: "json",
  });
  const responseData = typia.assert<FetchCommunitiesSuccessResponse | FetchCommunitiesErrorResponse>(
    await response.json(),
  );
  if (!responseData.success) throw new ResponseError();
  return { communities: responseData.communities };
};

export const fetchSpaceGroups = async (apiKey: string, communityId: number) => {
  const response = await request({
    method: "GET",
    url: Routes.space_groups_integrations_circle_index_path({
      format: "json",
      api_key: apiKey,
      community_id: communityId,
    }),
    accept: "json",
  });
  const responseData = typia.assert<FetchSpaceGroupsSuccessResponse | FetchSpaceGroupsErrorResponse>(
    await response.json(),
  );
  if (!responseData.success) throw new ResponseError();
  return { spaceGroups: responseData.space_groups };

View on GitHub (pinned to afeacbd394)

Solutions

  1. Re-enter the Circle API key: copy it fresh from Circle's developer/API settings into the Gumroad Circle integration field and let fetchCommunities re-run.
  2. Verify the key against Circle directly: curl -H "Authorization: Bearer <KEY>" https://app.circle.so/api/v1/communities — a 401 there reproduces exactly what the controller swallows into success:false.
  3. If the key is valid, check Circle's status page for an outage and retry once Circle recovers.
  4. If you maintain this code, throw a specific message instead of the default so the picker can tell the seller the key is the problem (see exampleFix).

Example fix

// before (circle_integration.ts:26)
if (!responseData.success) throw new ResponseError();

// after
if (!responseData.success)
  throw new ResponseError("Couldn't load Circle communities. Check that the API key is valid and try again.");
Defensive patterns

Strategy: try-catch

Validate before calling

const apiKeyOk = typeof apiKey === "string" && apiKey.trim().length > 0;
if (!apiKeyOk) throw new Error("Enter a Circle API key before loading communities.");
await fetchCommunities(apiKey);

Type guard

import { ResponseError } from "$app/utils/request";
const isResponseError = (e: unknown): e is ResponseError => e instanceof ResponseError;

Try / catch

import { assertResponseError } from "$app/utils/request";
try {
  const { communities } = await fetchCommunities(apiKey);
} catch (e) {
  assertResponseError(e); // rethrows genuine bugs
  showAlert("Couldn't reach Circle. Check the API key and try again.", "error");
}

Prevention

When it happens

Trigger: Calling fetchCommunities(apiKey) with an empty string api_key (controller line 7 short-circuits to success:false); a revoked or mistyped Circle API key (Circle answers 401 upstream and the controller collapses it to success:false with HTTP 200); a Circle API outage or timeout on their side; a changed upstream Circle response shape that is no longer an array.

Common situations: Seller pastes an expired or typo'd Circle API key into the integration form; the key was rotated in Circle but not updated in Gumroad; Circle has a partial outage while the seller opens the community picker; the integration was disconnected and stale form state submits an empty key.

Related errors


AI-assisted analysis of antiwork/gumroad@afeacbd394 (2026-08-21). Data as JSON: /api/errors/cd65018003c0acea. Report an issue: GitHub.