antiwork/gumroad · error · ResponseError
Something went wrong.
Error message
Something went wrong.
What it means
Fallback in the legal-guardian (minor creator) payouts form. Saving sends a guardian payload via PUT/POST to settings_guardian(s)_path; on !response.ok it reads { error } from the JSON body ({} if unparseable) and throws ResponseError('Something went wrong.') when the server provided none. Successful saves re-read the guardian from the response and show payout-resume vs terms-pending messaging, so this error strictly means the save itself failed. The tax-id field is only sent when non-empty so an edit cannot wipe a stored value.
Source
Thrown at app/javascript/components/Settings/PaymentsPage/LegalGuardianSection.tsx:185
city: formState.city,
state: formState.state,
zip_code: formState.zip_code,
accept_terms: formState.accept_terms,
};
// Only sent when the seller typed one. Sending the empty string would overwrite the identifier on
// file with nothing and quietly make a complete guardian incomplete again.
if (formState.individual_tax_id.trim() !== "") payload.individual_tax_id = formState.individual_tax_id.trim();
try {
const response = await request({
method: existing ? "PUT" : "POST",
accept: "json",
url: existing ? Routes.settings_guardian_path(existing.id) : Routes.settings_guardians_path(),
data: { guardian: payload },
});
if (!response.ok) {
const body = typia.assert<{ error?: string }>(await response.json().catch(() => ({})));
throw new ResponseError(body.error ?? "Something went wrong.");
}
// typia rather than a cast, so a response shape that drifts from this contract fails loudly
// here instead of writing undefined into the form and reporting success.
const { guardian } = typia.assert<{ guardian: Guardian }>(await response.json());
setFormState(guardianToFormState(guardian));
// The incomplete branch names the terms specifically: it is the only required field a seller
// can leave unset and still save, so it is the only reason this message ever appears.
showAlert(
guardian.has_completed_info
? "Your legal guardian's details are saved. Payouts will resume on your next payout date."
: "Your legal guardian's details are saved, but payouts stay on hold until your guardian accepts the terms.",
"success",
);
// Last, and after the local form state is already correct: this refetches the page's own
// guardian props, which is what moves the payout-hold notice. Doing it before the setState
// above would let the reload's re-render race the form's own update.
onSaved();View on GitHub (pinned to afeacbd394)
Solutions
- Inspect the failed request's response body; this fallback means no error key was present.
- Reload and retry to rule out session/CSRF expiry.
- Verify required guardian fields (name, DOB, address) are complete and the tax id is well-formed when provided.
- Server-side: pluck validation and Stripe errors into body.error so the fallback never masks the cause.
Defensive patterns
Strategy: try-catch
Type guard
const isGuardianSaveFailure = (response: Response, body: { error?: string }): boolean =>
!response.ok && !body.error; Try / catch
try {
const response = await request({ method: existing ? "PUT" : "POST", accept: "json", url, data: { guardian: payload } });
if (!response.ok) {
const body = typia.assert<{ error?: string }>(await response.json().catch(() => ({})));
throw new ResponseError(body.error ?? "Something went wrong.");
}
const { guardian } = typia.assert<{ guardian: Guardian }>(await response.json());
setFormState(guardianToFormState(guardian));
} catch (error) {
setFormError(error instanceof Error ? error.message : "Couldn't save guardian.");
} Prevention
- Include per-field validation errors in body.error so guardians can self-correct.
- Only send individual_tax_id when non-empty (as the code does) so edits don't wipe stored values.
- Re-auth on 401 rather than showing the generic fallback.
When it happens
Trigger: PUT/POST /settings/guardians(/:id) returns non-2xx without body.error — controller validation of the guardian's personal details or individual_tax_id failing silently, 401/419 session or CSRF expiry, or a 500 HTML page.
Common situations: KYC/tax-id validation rejections not translated into body.error, long-lived settings tabs with expired sessions, or the guardian record deleted in another tab making the PUT target stale.
Related errors
- Request failed (${response.status})
- ${responseData.error_message}
- Something went wrong.
- Something went wrong.
- Something went wrong.
AI-assisted analysis of antiwork/gumroad@afeacbd394 (2026-08-21).
Data as JSON: /api/errors/7fffc7125f5d851c.
Report an issue: GitHub.