antiwork/gumroad · warning · Error
Sorry, something went wrong. Please try again.
Error message
Sorry, something went wrong. Please try again.
What it means
EmailConfirmationBanner resends the confirmation email via POST resend_confirmation_email_settings_main_path. The catch (line 45) shows 'Sorry, something went wrong. Please try again.' whenever the request is not ok — the inner code throws a bare `new Error()` — or when any exception escapes, including a RateLimitError raised inside request() for a 429, whose server-written explanation and retry-after are therefore lost to the generic string. The success:false path (nothing left to confirm) is handled separately and gracefully.
Source
Thrown at app/javascript/components/EmailConfirmationBanner.tsx:31
type EmailConfirmationBannerProps = EmailConfirmation & {
children?: React.ReactNode;
};
// Deliberately not dismissible: account confirmation gates real product actions, so the
// reminder stays up until the seller actually confirms.
export const EmailConfirmationBanner = ({ email, can_resend, children }: EmailConfirmationBannerProps) => {
const [resendState, setResendState] = React.useState<"initial" | "sending" | "sent">("initial");
const resendConfirmationEmail = async () => {
setResendState("sending");
try {
const response = await request({
method: "POST",
url: Routes.resend_confirmation_email_settings_main_path(),
accept: "json",
});
if (!response.ok) throw new Error();
// The endpoint replies 200 with { success: false } when the resend was
// rejected — the only rejection case is that there is nothing left to
// confirm (e.g. the email was confirmed in another tab while the banner
// was still up), so tell the seller that instead of a generic error.
const responseData = typia.assert<{ success: boolean }>(await response.json());
if (!responseData.success) {
setResendState("initial");
showAlert("Your email address is already confirmed — refresh the page to continue.", "error");
return;
}
setResendState("sent");
} catch {
setResendState("initial");
showAlert("Sorry, something went wrong. Please try again.", "error");
}
};
return (View on GitHub (pinned to afeacbd394)
Solutions
- Check the Network tab: a 429 means the user just has to wait — the generic string misdescribes that as a malfunction.
- Handle RateLimitError distinctly and show its message/retryAfter instead of the fixed string.
- If 401, reload the page to refresh the session, then resend.
- Add a cooldown on the Resend button client-side so users do not trip the server throttle at all.
Example fix
// before
if (!response.ok) throw new Error();
} catch {
showAlert('Sorry, something went wrong. Please try again.', 'error');
}
// after — keep the server's throttle wording instead of masking it
} catch (e) {
if (e instanceof RateLimitError) {
showAlert(e.message, 'error');
return;
}
assertResponseError(e);
showAlert('Sorry, something went wrong. Please try again.', 'error');
} Defensive patterns
Strategy: try-catch
Validate before calling
const canResend = (state: string): boolean => state !== 'sending'; if (!canResend(resendState)) return; // stop double-clicks from tripping the server throttle
Type guard
const isRateLimitError = (e: unknown): e is RateLimitError => e instanceof RateLimitError;
Try / catch
} catch (e) {
if (e instanceof RateLimitError) {
showAlert(e.message, 'error'); // keep the server's 'wait N minutes' wording
return;
}
assertResponseError(e);
showAlert('Sorry, something went wrong. Please try again.', 'error');
} Prevention
- Handle RateLimitError before the generic catch — resends are throttled server-side and 429 is the expected failure.
- Disable the Resend button while in 'sending' state to prevent throttle-tripping double clicks.
- A 401 here usually means session expiry — suggest a page reload in the message.
- Keep the success:false branch (nothing left to confirm) distinct, as the code already does — that path needs different wording than an error.
When it happens
Trigger: POST returning 401 (session expired) or 429 (resend endpoint rate-limited — the common case, since resends are throttled); or a network failure — all fall into the bare catch and produce the same generic message.
Common situations: Seller clicks Resend repeatedly and trips the per-email throttle; banner left open past session expiry; flaky connection on mobile.
Related errors
- Something went wrong.
- Something went wrong.
- Something went wrong.
- Something went wrong.
- Something went wrong.
AI-assisted analysis of antiwork/gumroad@afeacbd394 (2026-08-21).
Data as JSON: /api/errors/96abf2d860b0a98e.
Report an issue: GitHub.