antiwork/gumroad · error · ResponseError
Sorry, something went wrong. Please try again.
Error message
Sorry, something went wrong. Please try again.
What it means
deleteWishlistItem (app/javascript/data/wishlists.ts:119-132) DELETEs Routes.wishlist_product_path(wishlistId, wishlistProductId) and throws generic ResponseError ('Something went wrong.') on !response.ok; the wishlist page's catch (components/Wishlist/index.tsx:106-108) shows the listed message 'Sorry, something went wrong. Please try again.'. With 5xx/429/network pre-handled in request(), this is a 4xx: 404 (item already removed — stale card, second tab), 403 (viewer can't edit), 401 (expired session).
Source
Thrown at app/javascript/data/wishlists.ts:131
url: Routes.wishlist_path(wishlistId),
accept: "json",
});
if (!response.ok) throw new ResponseError();
};
export const deleteWishlistItem = async ({
wishlistId,
wishlistProductId,
}: {
wishlistId: string;
wishlistProductId: string;
}) => {
const response = await request({
method: "DELETE",
url: Routes.wishlist_product_path(wishlistId, wishlistProductId),
accept: "json",
});
if (!response.ok) throw new ResponseError();
};
export const followWishlist = async ({ wishlistId }: { wishlistId: string }) => {
const response = await request({
method: "POST",
url: Routes.wishlist_followers_path(wishlistId),
accept: "json",
});
if (!response.ok) {
const data = typia.assert<{ error: string }>(await response.json());
throw new ResponseError(data.error);
}
};
export const unfollowWishlist = async ({ wishlistId }: { wishlistId: string }) => {
const response = await request({
method: "DELETE",
url: Routes.wishlist_followers_path(wishlistId),View on GitHub (pinned to afeacbd394)
Solutions
- Refresh the wishlist — the removed item disappears and the goal state is reached
- Keep the per-card isDeleting guard (index.tsx:97-100) so double clicks can't fire two DELETEs
- Confirm canEdit was true when rendering the delete affordance
- Check the DELETE's status in the network tab; treat 404 as already-removed
Example fix
// components/Wishlist/index.tsx — reconcile on failure instead of only toasting
} catch (e) {
assertResponseError(e);
showAlert("Sorry, something went wrong. Please try again.", "error");
void refreshItems(); // if it 404'd because it's gone, the list converges
} Defensive patterns
Strategy: try-catch
Validate before calling
const itemInState = (itemId: string, items: WishlistItem[]) => items.some((i) => i.id === itemId); if (!itemInState(item.id, items)) return; // already removed elsewhere
Type guard
const isResponseError = (e: unknown): e is ResponseError => e instanceof ResponseError;
Try / catch
try {
await deleteWishlistItem({ wishlistId, wishlistProductId: item.id });
onDelete();
} catch (e) {
assertResponseError(e);
showAlert("Sorry, something went wrong. Please try again.", "error");
void refreshItems(); // if it 404'd because it's gone, the list converges
} Prevention
- Keep the isDeleting per-card guard so double clicks can't fire two DELETEs
- Only render the trash affordance when canEdit is true
- Treat already-removed as success and refresh from server truth
When it happens
Trigger: Clicking the trash icon on a wishlist item that was already removed in another tab (404); deleting from a wishlist the user can no longer edit (403); double-clicking remove so the second DELETE 404s; session expiring before the click (401).
Common situations: Multi-tab wishlist editing; back-navigation to a stale rendered list; the isDeleting flag in index.tsx not yet disabling the button on slow networks; tests deleting the same fixture item twice.
Related errors
- An error occurred while loading more items
- 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/9bfb7fa40a1608fa.
Report an issue: GitHub.