fix(profile): surface the real /auth/me failure mode in the error banner #380
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
psa-systems/mokosh-apps!380
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/MAPPS-331-profile-load-error"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
MAPPS-331: the "Could not load your profile. Refresh the page to retry." banner is a generic fallback the resource hook renders for ANY non-success from /auth/me, because the page calls
get_authed::<MeResponse>(...).ok()and collapses status + body + decode errors into a bareNone. That keeps the actual fault hidden behind a DevTools dig, and is the reason the symptom is hard to reproduce off a screenshot.Switch to
get_authed_typed::<MeResponse>(...), keep theApiErroron the resource, and render the user-facing message (e.g. "Your session has expired", "The server hit an error") plus the structuredDisplay(e.g. "http 403: ...") underneath. The page now reads as a diagnostic so a future regression names itself, and the first MAPPS-331 reproduction lands with the failure mode attached instead of "the banner showed up again".This is the diagnostic step the ticket asks for in step 1; the actual server- vs client-side fix follows whatever the captured status code points at.
#MAPPS-331