You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(profile): render associate-flow errors as an alert instead of raw JSON (#50)
When linking a provider fails (most commonly oauth_account_already_linked),
the backend now 302s back to /profile?associate_error=<code>&associate_provider=<p>
instead of returning JSON. Render the result as a dismissible destructive
alert in the Connected accounts section, then scrub the URL via
navigate({replace: true}) so a refresh doesn't re-trigger.
- New src/lib/associate-errors.ts holds the per-provider copy (also used
by the dev fetch path in the steam/google callback pages, which were
duplicating the same map).
- profile route validates the pair atomically — if either param is
missing or the provider is unknown, both are dropped.
- Tests cover the happy path, generic fallback, dismiss action, and the
malformed-search guard.
0 commit comments